Commit 139ca94f by Thews

20231211汪皖苏

1 parent d533039a
...@@ -117,4 +117,14 @@ export function getYMXZDGLUpdate(params) { ...@@ -117,4 +117,14 @@ export function getYMXZDGLUpdate(params) {
// 删除字典 // 删除字典
export function getYMXZDGLDel(params) { export function getYMXZDGLDel(params) {
return post('/ynMolDicy/deleteYnMolProy', params); return post('/ynMolDicy/deleteYnMolProy', params);
} }
\ No newline at end of file
// 获取字典数据
export function getYMXZDGLProyList(params) {
return post('/ynMolDicy/getYnMolProyList', params);
}
// 删除字典数据
export function getYMXZDGLProyDel(params) {
return post('/ynMolDicy/deleteYnMolProy', params);
}
...@@ -140,15 +140,15 @@ ...@@ -140,15 +140,15 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<!-- <el-button icon="el-icon-edit" size="mini" @click="operateDia('edit',scope.row)">编辑</el-button> --> <!-- <el-button icon="el-icon-edit" size="mini" @click="operateDia('edit',scope.row)">编辑</el-button> -->
<el-button icon="el-icon-circle-plus-outline" size="mini" @click="operateDia('add',scope.row,scope.$index)">添加</el-button> <!-- <el-button icon="el-icon-circle-plus-outline" size="mini" @click="operateDia('add',scope.row,scope.$index)">添加</el-button> -->
<el-button icon="el-icon-delete" size="mini" @click="operateDia('del',scope.row,scope.$index)">删除</el-button> <el-button icon="el-icon-delete" size="mini" @click="operateDia('del',scope.row,scope.$index)">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div class="newBtn"> <div class="newBtn">
<el-button class="addItem" icon="el-icon-plus" circle></el-button> <el-button class="addItem" icon="el-icon-plus" circle @click="operateDia('add')"></el-button>
</div> --> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('push')">发布</el-button> <el-button class="greenButton" @click="operate('push')">发布</el-button>
...@@ -167,6 +167,8 @@ import { ...@@ -167,6 +167,8 @@ import {
getYMXZDGLDel, getYMXZDGLDel,
getYMXZDGLUpdate, getYMXZDGLUpdate,
query_jia_gou_gui_shu, query_jia_gou_gui_shu,
getYMXZDGLProyList,
getYMXZDGLProyDel,
} from "@/api/index.js"; } from "@/api/index.js";
export default { export default {
...@@ -177,15 +179,7 @@ export default { ...@@ -177,15 +179,7 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
tableData2: [ tableData2: [],
{
fieldName: "",
chineseName: "",
displayOrder: "",
controlType: "",
contentLength: "",
}
],
selectList: [], selectList: [],
add_dialog: false, add_dialog: false,
title: "", title: "",
...@@ -310,17 +304,7 @@ export default { ...@@ -310,17 +304,7 @@ export default {
this.add_dialog = true; this.add_dialog = true;
this.title = "编辑字典"; this.title = "编辑字典";
this.formData = item; this.formData = item;
if (this.tableData2.length == 0) { this.getProyList(item);
this.tableData2 = [
{
fieldName: "",
chineseName: "",
displayOrder: "",
controlType: "",
contentLength: "",
}
];
}
}else if (type == "create") { }else if (type == "create") {
this.formData.state = 2; this.formData.state = 2;
if (this.formData.dicyId) { if (this.formData.dicyId) {
...@@ -415,9 +399,9 @@ export default { ...@@ -415,9 +399,9 @@ export default {
// 对话表格操作 // 对话表格操作
operateDia( type, scopeRow, index){ operateDia( type, scopeRow, index){
console.log( type, scopeRow, index); // console.log( type, scopeRow, index);
let arr = this.tableData2.concat(); let arr = this.tableData2.concat();
let addData = JSON.parse(JSON.stringify(arr[index])); // JSON.parse(JSON.stringify(arr[index])) let addData = {}; // JSON.parse(JSON.stringify(arr[index]))
switch (type) { switch (type) {
// 添加 // 添加
case 'add': case 'add':
...@@ -426,11 +410,23 @@ export default { ...@@ -426,11 +410,23 @@ export default {
addData.displayOrder = ''; addData.displayOrder = '';
addData.contentLength = ''; addData.contentLength = '';
addData.controlType = ''; addData.controlType = '';
arr.splice( index+1, 0, addData); arr.splice(arr.length, 0, addData);
break; break;
// 删除 // 删除
case 'del': case 'del':
arr.splice( index, 1) // arr.splice( index, 1)
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getYMXZDGLProyDel(scopeRow).then(res => {
if (res.code == 200) {
this.$message.success("删除成功");
this.getProyList(this.formData);
}
});
});
break; break;
} }
this.tableData2 = arr; this.tableData2 = arr;
...@@ -442,6 +438,21 @@ export default { ...@@ -442,6 +438,21 @@ export default {
this.editIndex = row.index; this.editIndex = row.index;
this.columnIsShow = true; this.columnIsShow = true;
}, },
// 获取字典属性接口
getProyList(item) {
console.log(item);
let params = {
type: item.type,
typeId: item.typeId,
}
getYMXZDGLProyList(params).then(res => {
if (res.code == 200) {
console.log(res);
this.tableData2 = res.data;
}
});
},
}, },
} }
</script> </script>
......
...@@ -149,15 +149,15 @@ ...@@ -149,15 +149,15 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<!-- <el-button icon="el-icon-edit" size="mini" @click="operateDia('edit',scope.row)">编辑</el-button> --> <!-- <el-button icon="el-icon-edit" size="mini" @click="operateDia('edit',scope.row)">编辑</el-button> -->
<el-button icon="el-icon-circle-plus-outline" size="mini" @click="operateDia('add',scope.row,scope.$index)">添加</el-button> <!-- <el-button icon="el-icon-circle-plus-outline" size="mini" @click="operateDia('add',scope.row,scope.$index)">添加</el-button> -->
<el-button icon="el-icon-delete" size="mini" @click="operateDia('del',scope.row,scope.$index)">删除</el-button> <el-button icon="el-icon-delete" size="mini" @click="operateDia('del',scope.row,scope.$index)">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div class="newBtn"> <div class="newBtn">
<el-button class="addItem" icon="el-icon-plus" circle></el-button> <el-button class="addItem" icon="el-icon-plus" circle @click="operateDia('add',scope.row)"></el-button>
</div> --> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('push')">发布</el-button> <el-button class="greenButton" @click="operate('push')">发布</el-button>
...@@ -427,7 +427,7 @@ export default { ...@@ -427,7 +427,7 @@ export default {
addData.displayOrder = ''; addData.displayOrder = '';
addData.contentLength = ''; addData.contentLength = '';
addData.controlType = ''; addData.controlType = '';
arr.splice( index+1, 0, addData); arr.splice( arr.length, 0, addData);
break; break;
// 删除 // 删除
case 'del': case 'del':
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!