|
@@ -337,13 +337,18 @@
|
|
|
:formatter="formatOwner"
|
|
|
label="所属方"
|
|
|
></el-table-column>
|
|
|
- <el-table-column label="操作" width="240">
|
|
|
+ <el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
- @click="handleEdit(scope.$index, scope.row)"
|
|
|
+ @click="handlePreview(scope.$index, scope.row)"
|
|
|
>预览
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleEdit(scope.$index, scope.row)"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="success"
|
|
@@ -1196,7 +1201,7 @@
|
|
|
<el-button type="primary" @click="importHandle">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- 编辑元素 -->
|
|
|
+ <!-- 预览元素 -->
|
|
|
<el-dialog
|
|
|
:title="(curEleTable.tableName ? curEleTable.tableName : '') + ''"
|
|
|
:visible.sync="editEleVisible"
|
|
@@ -1708,6 +1713,85 @@
|
|
|
>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <el-dialog
|
|
|
+ title="元素编辑"
|
|
|
+ :visible.sync="editDialogShow"
|
|
|
+ width="80%"
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <p class="font-c-warning">编辑元素信息(请谨慎操作)</p>
|
|
|
+ <div style="display: flex; margin-bottom: 10px">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入你想编辑的元素名称"
|
|
|
+ v-model="searchinput"
|
|
|
+ :size="size"
|
|
|
+ clearable
|
|
|
+ @clear="clearsearchinput"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="small"
|
|
|
+ @click="searchinputChange"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="editTable"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ height="400px"
|
|
|
+ v-loading="editEleTableloading"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="eName" label="元素名称">
|
|
|
+ <template slot="header">
|
|
|
+ <i class="required"></i>
|
|
|
+ <span>元素名称</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.eName"
|
|
|
+ size="small"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column align="center" prop="dynamicDict" label="动态字典">
|
|
|
+ <template slot="header">
|
|
|
+ <span>动态字典</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.dynamicDict"
|
|
|
+ filterable
|
|
|
+ size="small"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dynamicDictList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="editEleVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveEles">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -1739,6 +1823,7 @@ import {
|
|
|
saveElement,
|
|
|
remove as removeElement,
|
|
|
updateBatchElements,
|
|
|
+ updateBatchElements1,
|
|
|
getTemplate,
|
|
|
importWbsElement,
|
|
|
} from "@/api/manager/wbsformelement";
|
|
@@ -2060,6 +2145,11 @@ export default {
|
|
|
label: "公式同步",
|
|
|
load: false,
|
|
|
},
|
|
|
+ {
|
|
|
+ value: "zdSync",
|
|
|
+ label: "字典同步",
|
|
|
+ load: false,
|
|
|
+ },
|
|
|
],
|
|
|
menuvalue: "",
|
|
|
isshowSyncbtn: false,
|
|
@@ -2073,6 +2163,11 @@ export default {
|
|
|
nodesCheck: [],
|
|
|
standardTypeOptions: [], //标准分类
|
|
|
unitOptions: [], //单位名称
|
|
|
+ editDialogShow: false, //编辑元素
|
|
|
+ searchinput: "",
|
|
|
+ editTable: [],
|
|
|
+ editEleTableloading: false,
|
|
|
+ dynamicDictList: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2363,7 +2458,7 @@ export default {
|
|
|
|
|
|
importHandle() {},
|
|
|
|
|
|
- handleEdit(index, row) {
|
|
|
+ handlePreview(index, row) {
|
|
|
this.curEleTable = row;
|
|
|
selectPrivateFormElements(this.curEleTable.initTableId).then((res) => {
|
|
|
res.data.data.forEach((element) => {
|
|
@@ -2471,6 +2566,7 @@ export default {
|
|
|
});
|
|
|
this.editEleFormulaVisible = true;
|
|
|
},
|
|
|
+
|
|
|
//表单同步
|
|
|
handlesync(index, row) {
|
|
|
this.handlesyncLoad = true;
|
|
@@ -2529,45 +2625,7 @@ export default {
|
|
|
list.splice(index, 1);
|
|
|
}
|
|
|
},
|
|
|
- saveEles() {
|
|
|
- for (let i = 0; i < this.editEleList.length; i++) {
|
|
|
- if (!this.editEleList[i].id) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "请先将新增的元素点击保存",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.editEleList.length > 0) {
|
|
|
- this.editEleList.forEach((element) => {
|
|
|
- element.eAllowDeviation =
|
|
|
- (element.allow ? element.allow : "") +
|
|
|
- (element.deviation ? element.deviation : "");
|
|
|
- if (element.eType == 4) {
|
|
|
- element.eLength = 0;
|
|
|
- }
|
|
|
- });
|
|
|
- updateBatchElements(
|
|
|
- this.editEleList,
|
|
|
- this.curEleTable.initTableName
|
|
|
- ).then(() => {
|
|
|
- this.editEleVisible = false;
|
|
|
- this.updateNodeTable();
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "保存成功!",
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.editEleVisible = false;
|
|
|
- this.updateNodeTable();
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "保存成功!",
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
nodeTypeChange(val) {
|
|
|
console.log(333333333);
|
|
|
if (val === 53) {
|
|
@@ -4062,12 +4120,78 @@ export default {
|
|
|
});
|
|
|
} else if (item.value === "dqSync") {
|
|
|
this.syncElectric(item);
|
|
|
+ } else if (item.value === "zdSync") {
|
|
|
+ console.log("字典同步");
|
|
|
}
|
|
|
},
|
|
|
//展示数据同步下拉框
|
|
|
showSyncbtn() {
|
|
|
this.isshowSyncbtn = !this.isshowSyncbtn;
|
|
|
},
|
|
|
+ getDictTypelist() {
|
|
|
+ if (this.dynamicDictList.length > 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ getDictionary({
|
|
|
+ code: "land_field_dict",
|
|
|
+ }).then((res) => {
|
|
|
+ res.data.data.forEach((element) => {
|
|
|
+ element.dictKey = Number(element.dictKey);
|
|
|
+ });
|
|
|
+ this.dynamicDictList = res.data.data;
|
|
|
+ const filteredList = this.dynamicDictList.filter(
|
|
|
+ (item) => item.dictKey === 600
|
|
|
+ );
|
|
|
+ this.dynamicDictList = filteredList;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getSelectFormElements(id) {
|
|
|
+ this.editEleTableloading = true;
|
|
|
+ selectFormElements(this.curEleTable.id, {
|
|
|
+ type: 0,
|
|
|
+ search: this.searchinput,
|
|
|
+ }).then((res) => {
|
|
|
+ this.editEleTableloading = false;
|
|
|
+ this.editTable = res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //编辑
|
|
|
+ handleEdit(index, row) {
|
|
|
+ this.curEleTable = row;
|
|
|
+ this.getSelectFormElements();
|
|
|
+ this.editDialogShow = true;
|
|
|
+ this.getDictTypelist();
|
|
|
+ },
|
|
|
+ //编辑元素信息(请谨慎操作)
|
|
|
+ clearsearchinput() {
|
|
|
+ this.getSelectFormElements();
|
|
|
+ },
|
|
|
+ searchinputChange() {
|
|
|
+ this.getSelectFormElements();
|
|
|
+ },
|
|
|
+
|
|
|
+ saveEles() {
|
|
|
+ if (this.editTable.length > 0) {
|
|
|
+ updateBatchElements1(
|
|
|
+ this.editTable,
|
|
|
+ this.curEleTable.initTableName
|
|
|
+ ).then(() => {
|
|
|
+ this.editDialogShow = false;
|
|
|
+ this.updateNodeTable();
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.editDialogShow = false;
|
|
|
+ this.updateNodeTable();
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
"GLExcelFrom.search"(val) {
|