diff --git a/h5-datax-manager/src/components/common/cont.vue b/h5-datax-manager/src/components/common/cont.vue index 64f0312..2b128f5 100644 --- a/h5-datax-manager/src/components/common/cont.vue +++ b/h5-datax-manager/src/components/common/cont.vue @@ -2,8 +2,7 @@ - + - -
- - 选取文件 -
只能上传excel文件,且不超过5MB
-
{{fileName}}
+ + 选取文件 +
只能上传excel文件,且不超过5MB
+
{{fileName}}
@@ -169,13 +212,14 @@ mixins: [ contmixin ], + components: { fileHome, dataManageRedact, updateFieldFolder, contNewFule }, - + props: { title: { type: String, @@ -189,8 +233,8 @@ type: Array, default: null }, - }, + watch: { list() { if (this.list.length > 0) { @@ -198,6 +242,7 @@ } } }, + data() { return { list: [], @@ -222,6 +267,7 @@ searchForm: {} } }, + created() { this.getData.getTree({ type: this.getData.type @@ -230,6 +276,7 @@ this.clickCurrid(99999999) }) }, + methods: { moveChange(e) { //移动文件夹 let arr = this.selection.map((value) => { @@ -255,7 +302,6 @@ }) this.tempMove = "" }, - down() { window.open(window.origin + '/Riskmanage/v2/datamanage/field/downTemplate') }, @@ -275,12 +321,9 @@ type: 'success', message: '删除成功!' }); - this.deepGetCurr(id, this.list, (value, item, index) => { item.splice(index, 1) }) - - } this.leftloading = false this.currid = 99999999 @@ -294,7 +337,6 @@ updatafilelist(params) { this.leftloading = true let tempNum = null - this.deepGetCurr(params.id, this.list, (value) => { tempNum = value.parentId }) @@ -324,8 +366,6 @@ this.leftloading = false }) }, - - getlist() { this.contloading = true this.listRedact = false @@ -338,7 +378,6 @@ this.data = res this.contloading = false }) - }, clickpage(e) { this.currPage = e @@ -357,7 +396,6 @@ }) }, using(id) { - let arr = this.selection.map((value) => { return value.id }) @@ -365,23 +403,58 @@ this.$message.error('未选择任何文件'); return } - let params = { - status: id, - ids: arr.join(','), - fieldTypeId: this.currid - } - this.getData.fieldusing(params).then(res => { - if (res.status == "1") { - this.$message({ - message: '操作成功', - type: 'success' - }); - this.getlist() - this.selection = [] - this.$store.dispatch('reGetfielduser') - } - }) + const operations = { + '-1': '删除', + '1': '启用', + '0': '停用' + }; + let operationText = operations[id.toString()] || '未知操作'; + + this.$confirm(`此操作将永久${operationText}, 是否继续?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let params = { + status: id, + ids: arr.join(','), + fieldTypeId: this.currid + } + this.getData.fieldusing(params).then(res => { + if (res.status == "1") { + this.$message({ + message: '操作成功', + type: 'success' + }); + this.getlist() + this.selection = [] + this.$store.dispatch('reGetfielduser') + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: `已取消${operationText}` + }); + }); + // let params = { + // status: id, + // ids: arr.join(','), + // fieldTypeId: this.currid + // } + + // this.getData.fieldusing(params).then(res => { + // if (res.status == "1") { + // this.$message({ + // message: '操作成功', + // type: 'success' + // }); + // this.getlist() + // this.selection = [] + // this.$store.dispatch('reGetfielduser') + // } + // }) }, newFileSure() { this.leftloading = true @@ -397,10 +470,13 @@ } this.mixnewFileSure(params) - } + }, + handleSearch() { + + }, + handleReset() { + + }, } - - - } diff --git a/h5-datax-manager/src/components/page/Datamanage.vue b/h5-datax-manager/src/components/page/Datamanage.vue index 57f0eae..2a8d70a 100644 --- a/h5-datax-manager/src/components/page/Datamanage.vue +++ b/h5-datax-manager/src/components/page/Datamanage.vue @@ -1,17 +1,22 @@ - - + \ No newline at end of file diff --git a/h5-datax-manager/src/components/page/DeriveManage.vue b/h5-datax-manager/src/components/page/DeriveManage.vue index 1b0800e..c9c1ea6 100644 --- a/h5-datax-manager/src/components/page/DeriveManage.vue +++ b/h5-datax-manager/src/components/page/DeriveManage.vue @@ -28,31 +28,33 @@ return { getDataFun: { type: 3, - row: [{ - label: '序号', - row: 'id' - }, { - label: '字段名称', - row: 'fieldEn' - }, { - label: '字段中文名', - row: 'fieldCn' - }, { - label: '字段类型', - row: 'valueType', - type:'type' - }, { - label: '状态', - row: 'status', - type: 'State' - }, { - label: '创建人', - row: 'nickName' - }, { - label: '创建时间', - row: 'created', - type: 'Time' - }, ], + row: [ + { + label: '序号', + row: 'id' + }, { + label: '字段名称', + row: 'fieldEn' + }, { + label: '字段中文名', + row: 'fieldCn' + }, { + label: '字段类型', + row: 'valueType', + type:'type' + }, { + label: '状态', + row: 'status', + type: 'State' + }, { + label: '创建人', + row: 'nickName' + }, { + label: '创建时间', + row: 'created', + type: 'Time' + } + ], redact: "dataManageRedact", async getTree(e){ return await getfieldListTree(e).then(res => { @@ -66,49 +68,41 @@ }) }, async addlist(e) { - return await addfieldList(e).then(res => { return res }) }, async updatalist(e) { - return await updatafieldList(e).then(res => { return res }) }, async setsave(e) { - return await getfieldsave(e).then(res => { return res }) }, async getInfo(e) { - return await getfieldInfo(e).then(res => { return res }) }, async updatafield(e) { - return await updatafield(e).then(res => { return res }) }, async fieldusing(e) { - return await fieldusing(e).then(res => { return res }) }, async down(e) { - return await fielddownTemplate(e).then(res => { return res }) }, async fieldsubmit(e) { - return await fieldupdata(e).then(res => { return res }) @@ -117,8 +111,4 @@ }; } }; - - - + \ No newline at end of file diff --git a/h5-datax-manager/src/components/page/SQLManage.vue b/h5-datax-manager/src/components/page/SQLManage.vue index 346ab34..2476253 100644 --- a/h5-datax-manager/src/components/page/SQLManage.vue +++ b/h5-datax-manager/src/components/page/SQLManage.vue @@ -1,17 +1,22 @@