|
@@ -137,15 +137,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {delTableData, dragTableInfo, listTable, unionListTableData} from "@/api/tablelist/commonTable";
|
|
|
+import {delTableData, dragTableInfo, listTable, unionListTableData, getInfoBySqlKey} from "@/api/tablelist/commonTable";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
-import { dragTableInfo, listTable, unionListTableData, getInfoBySqlKey } from "@/api/tablelist/commonTable";
|
|
|
-import { getToken } from "@/utils/auth";
|
|
|
import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "listInfo",
|
|
|
- components: { Queryfrom },
|
|
|
+ components: {Queryfrom},
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -182,7 +180,7 @@ export default {
|
|
|
// 是否更新已经存在的数据
|
|
|
updateSupport: 0,
|
|
|
// 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ headers: {Authorization: "Bearer " + getToken()},
|
|
|
// 上传的地址
|
|
|
url: process.env.VUE_APP_BASE_API3 + "common/uploadData",
|
|
|
},
|
|
@@ -229,7 +227,7 @@ export default {
|
|
|
// 序列化当前查询参数列表
|
|
|
this.queryParams.queryMap = queryParams.queryMap
|
|
|
// 获取当前表单结构信息
|
|
|
- dragTableInfo({ queryMap: { sqlkey: this.sqlkey } }).then(res => {
|
|
|
+ dragTableInfo({queryMap: {sqlkey: this.sqlkey}}).then(res => {
|
|
|
// 得到当前模版信息 --- sql columns queryWhere
|
|
|
this.templateInfo = res.data.resultMap;
|
|
|
this.tableName = this.templateInfo.template.dtTableName;
|
|
@@ -287,10 +285,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
- handleAdd(sqlkey) {
|
|
|
+ handleAdd(row) {
|
|
|
// this.reset();
|
|
|
- getInfoBySqlKey(sqlkey).then(({ data }) => {
|
|
|
- const htmlCode = data.dfHtmlTemplate;;
|
|
|
+ getInfoBySqlKey(this.sqlkey).then(({data}) => {
|
|
|
+ const htmlCode = data.dfHtmlTemplate;
|
|
|
this.iframeUrl = 'data:text/html;charset=utf-8,' + encodeURI(htmlCode);
|
|
|
this.open = true;
|
|
|
this.title = "添加信息";
|
|
@@ -300,6 +298,15 @@ export default {
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+
|
|
|
+ getInfoBySqlKey(this.sqlkey).then(({data}) => {
|
|
|
+ const htmlCode = data.dfHtmlTemplate;
|
|
|
+ this.iframeUrl = 'data:text/html;charset=utf-8,' + encodeURI(htmlCode);
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加信息";
|
|
|
+ this.form.password = this.initPassword;
|
|
|
+ });
|
|
|
+ return;
|
|
|
this.reset();
|
|
|
const userId = row.userId || this.ids;
|
|
|
getUser(userId).then((response) => {
|