|
@@ -222,6 +222,12 @@
|
|
|
icon="el-icon-document-copy"
|
|
|
class="text-icon"
|
|
|
></el-button>
|
|
|
+ <i
|
|
|
+ class="el-icon-edit-outline marleft10"
|
|
|
+ size="26"
|
|
|
+ style="color:#409EFF;cursor: pointer;"
|
|
|
+ @click="editEditElementForm()"
|
|
|
+ ></i>
|
|
|
<i
|
|
|
class="el-icon-sort marleft10"
|
|
|
size="26"
|
|
@@ -320,6 +326,82 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
+ <!-- 编辑元素表单信息 -->
|
|
|
+ <el-dialog
|
|
|
+ title="编辑元素表单信息"
|
|
|
+ :visible="editElementFormTag"
|
|
|
+ width="60%"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-table
|
|
|
+ :data="formDatass"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="tableName"
|
|
|
+ label="表名"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.tableName"
|
|
|
+ placeholder="请输入表名称"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tableType"
|
|
|
+ label="表类型"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tableType"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,key) in tableTypelist"
|
|
|
+ :key="key"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tableOwner"
|
|
|
+ label="所属方"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tableOwner"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,key) in ownerTypeList"
|
|
|
+ :key="key"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span
|
|
|
+ slot="footer"
|
|
|
+ class="dialog-footer"
|
|
|
+ >
|
|
|
+ <el-button @click="editElementFormTag = false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="editeditElementFormMF()"
|
|
|
+ >确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 导入元素 -->
|
|
|
<el-dialog
|
|
|
title="导入元素"
|
|
@@ -1312,7 +1394,7 @@
|
|
|
import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
import {
|
|
|
getLazytree, getDetail, update, selectByNodeTable, getAlltree,
|
|
|
- saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate,
|
|
|
+ saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate, updateBatchNodeTableInfo,
|
|
|
importWbsTree, exportTemplate, remove as removeTreeNode
|
|
|
} from "@/api/manager/wbstree";
|
|
|
import {
|
|
@@ -1324,6 +1406,8 @@ import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
+ formDatass: [],
|
|
|
+ editElementFormTag: false,
|
|
|
ImportElementdata: {
|
|
|
|
|
|
},
|
|
@@ -1410,7 +1494,6 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo"]),
|
|
|
-
|
|
|
dialogTitle: function () {
|
|
|
let text = '节点';
|
|
|
if (this.leftType == 1) {
|
|
@@ -1525,7 +1608,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
getNodeDetail (data, node) {
|
|
|
- console.log(data.value)
|
|
|
let parentName = '';
|
|
|
if (node.parent.data) {
|
|
|
parentName = node.parent.data.title;
|
|
@@ -2309,7 +2391,60 @@ export default {
|
|
|
},
|
|
|
xiazaielement () {
|
|
|
this.exportBatchTemplate()
|
|
|
- }
|
|
|
+ },
|
|
|
+ //#endregion
|
|
|
+
|
|
|
+ //#region 元素表单信息
|
|
|
+ editEditElementForm () {//标记元素
|
|
|
+ if (this.formData.length) {
|
|
|
+ let da = []
|
|
|
+ this.formDatass = [...this.formData]
|
|
|
+ this.formDatass.forEach(val => {
|
|
|
+ da.push({
|
|
|
+ tableType: val.tableType - 0,
|
|
|
+ tableOwner: val.tableOwner - 0,
|
|
|
+ id: val.id,
|
|
|
+ tableName: val.tableName,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.formDatass = da
|
|
|
+ this.editElementFormTag = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editeditElementFormMF () {//保存按钮
|
|
|
+ let da = []
|
|
|
+ let tag = true
|
|
|
+ this.formDatass.forEach(val => {
|
|
|
+ if (!val.tableName || !val.tableType || !val.tableOwner) {
|
|
|
+ tag = false
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ da.push({
|
|
|
+ id: val.id,
|
|
|
+ deptName: val.tableName,
|
|
|
+ tableType: val.tableType,
|
|
|
+ tableOwner: val.tableOwner,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ if (tag) {
|
|
|
+ this.updateBatchNodeTableInfo(da)
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '请填写完整元素表单的所有信息!',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async updateBatchNodeTableInfo (da) {//共有编辑元素
|
|
|
+ const { data: res } = await updateBatchNodeTableInfo(da)
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.editElementFormTag = false
|
|
|
+ this.updateNodeTable()
|
|
|
+ }
|
|
|
+ },
|
|
|
//#endregion
|
|
|
},
|
|
|
components: {
|