diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index 1912c4c8..745f437f 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -152,10 +152,10 @@ export default { } }, }, - // 测点集 + // 工段 mgroup: { list: { - name: "测点集列表", + name: "工段列表", req: async function(data){ return await http.get( `${config.API_URL}/mtm/mgroup/`, @@ -164,7 +164,7 @@ export default { } }, item: { - name: "获取测点集详情", + name: "获取工段详情", req: async function(id){ return await http.get( `${config.API_URL}/mtm/mgroup/${id}/` diff --git a/src/config/route.js b/src/config/route.js index 07ee2769..2b3a869d 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -2353,7 +2353,7 @@ const routes = [ "name": "mgruop", "path": "/enm_base/mgruop", "meta": { - "title": "测点集", + "title": "工段", "icon": "el-icon-grid", "perms": ["enm_base"] }, diff --git a/src/views/em/mpoint_form.vue b/src/views/em/mpoint_form.vue index 0ed99efa..2330862c 100644 --- a/src/views/em/mpoint_form.vue +++ b/src/views/em/mpoint_form.vue @@ -1,328 +1,409 @@ diff --git a/src/views/enm_base/mgroup.vue b/src/views/enm_base/mgroup.vue index bae025a0..5212cc8f 100644 --- a/src/views/enm_base/mgroup.vue +++ b/src/views/enm_base/mgroup.vue @@ -2,31 +2,110 @@
- - + +
- +
- - - + + + - - - + + + + + + + + + + @@ -35,79 +114,85 @@
+ v-if="dialog.save" + ref="saveDialog" + @success="handleSaveSuccess" + @closed="dialog.save = false" + > diff --git a/src/views/enm_base/mgroup_form.vue b/src/views/enm_base/mgroup_form.vue index 4b1ee665..f80c4e81 100644 --- a/src/views/enm_base/mgroup_form.vue +++ b/src/views/enm_base/mgroup_form.vue @@ -1,221 +1,265 @@ - - - - - \ No newline at end of file + }, + //显示 + open(mode = "add") { + this.mode = mode; + this.visible = true; + return this; + }, + //表单注入数据 + setData(data) { + Object.assign(this.form, data); + }, + getReceptionist(data) { + this.form.leader = data.id; + this.form.leader_name = data.name; + }, + //表单提交方法 + submit() { + let that = this; + that.$refs.dialogForm.validate(async (valid) => { + if (valid) { + that.isSaveing = true; + if (that.mode === "add") { + that.$API.mtm.mgroup.create + .req(that.form) + .then((res) => { + that.isSaveing = false; + that.$emit("success", that.form, that.mode); + that.visible = false; + that.$message.success("操作成功"); + }); + } else { + res = that.$API.mtm.mgroup.update + .req(that.form.id, that.form) + .then((res) => { + that.isSaveing = false; + that.$emit("success", that.form, that.mode); + that.visible = false; + that.$message.success("操作成功"); + }); + } + } + }); + }, + + //设置过滤项 + setFilters(filters) { + this.selectionFilters = filters; + this.setFiltersVisible = true; + }, + }, +}; + + + diff --git a/src/views/enm_monthSet/feeset.vue b/src/views/enm_monthSet/feeset.vue index f08ded41..29791d32 100644 --- a/src/views/enm_monthSet/feeset.vue +++ b/src/views/enm_monthSet/feeset.vue @@ -11,13 +11,13 @@ style="width: 120px;margin-right: 5px;" /> --> + /> - +
- +
- - - - - + + + + + - + @@ -77,101 +127,107 @@ + v-if="dialog.save" + ref="saveDialog" + @success="handleSaveSuccess" + @closed="dialog.save = false" + > diff --git a/src/views/enm_monthSet/feeset_form.vue b/src/views/enm_monthSet/feeset_form.vue index 779947c6..2433a49b 100644 --- a/src/views/enm_monthSet/feeset_form.vue +++ b/src/views/enm_monthSet/feeset_form.vue @@ -1,202 +1,224 @@ - - - - - \ No newline at end of file + visible: false, + isSaveing: false, + options: [], + feeOptions: [], + setFiltersVisible: false, + }; + }, + mounted() { + this.getFee(); + this.getMgroup(); + }, + methods: { + //获取集合列表 + getMgroup() { + this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => { + this.options = res; + }); + }, + //获取类型列表 + getFee() { + this.$API.fim.fee.req({ page: 0 }).then((res) => { + this.feeOptions = res; + }); + }, + //显示 + open(mode = "add") { + this.mode = mode; + this.visible = true; + return this; + }, + //表单注入数据 + setData(data) { + let year = data.year + ""; + let month = data.month < 10 ? "0" + data.month : data.month + ""; + month = year + "-" + month; + data.date = month; + Object.assign(this.form, data); + }, + getReceptionist(data) { + this.form.leader = data.id; + this.form.leader_name = data.name; + }, + //表单提交方法 + submit() { + let that = this; + that.$refs.dialogForm.validate(async (valid) => { + if (valid) { + that.isSaveing = true; + let arr = that.form.date.split("-"); + that.form.year = arr[0]; + that.form.month = arr[1]; + if (that.mode === "add") { + that.$API.fim.feeset.create + .req(that.form) + .then((res) => { + that.isSaveing = false; + that.$emit("success", that.form, that.mode); + that.visible = false; + that.$message.success("操作成功"); + }) + .catch((res) => { + that.isSaveing = false; + }); + } else { + res = that.$API.fim.feeset.update + .req(that.form.id, that.form) + .then((res) => { + that.isSaveing = false; + that.$emit("success", that.form, that.mode); + that.visible = false; + that.$message.success("操作成功"); + }) + .catch((res) => { + that.isSaveing = false; + }); + } + } + }); + }, + + //设置过滤项 + setFilters(filters) { + this.selectionFilters = filters; + this.setFiltersVisible = true; + }, + }, +}; + + + diff --git a/src/views/enm_monthSet/priceset.vue b/src/views/enm_monthSet/priceset.vue index 727dcf7d..79068ca0 100644 --- a/src/views/enm_monthSet/priceset.vue +++ b/src/views/enm_monthSet/priceset.vue @@ -3,13 +3,13 @@
+ /> - +
- +
-
- - - - - - + + + + + + @@ -52,91 +101,97 @@ + v-if="dialog.save" + ref="saveDialog" + @success="handleSaveSuccess" + @closed="dialog.save = false" + > diff --git a/src/views/mtm/mgroup.vue b/src/views/mtm/mgroup.vue index 54898026..826b204d 100644 --- a/src/views/mtm/mgroup.vue +++ b/src/views/mtm/mgroup.vue @@ -2,40 +2,108 @@
- 新增 + 新增
- - + +
- - - + + + - - + + - - - + + + @@ -43,20 +111,25 @@
- +