|
@@ -1927,8 +1927,8 @@
|
|
:expand-on-click-node="false"
|
|
:expand-on-click-node="false"
|
|
highlight-current
|
|
highlight-current
|
|
node-key="primaryKeyId"
|
|
node-key="primaryKeyId"
|
|
- ref="tree"
|
|
|
|
@check="handleCheckChange"
|
|
@check="handleCheckChange"
|
|
|
|
+ ref="syncProTree"
|
|
>
|
|
>
|
|
</el-tree>
|
|
</el-tree>
|
|
|
|
|
|
@@ -1937,7 +1937,7 @@
|
|
</el-card>
|
|
</el-card>
|
|
<el-card class="box-card-2">
|
|
<el-card class="box-card-2">
|
|
<el-form ref="syncForm" :model="syncForm" label-position="top">
|
|
<el-form ref="syncForm" :model="syncForm" label-position="top">
|
|
- <el-form-item label="同步范围">
|
|
|
|
|
|
+ <el-form-item label="同步范围" v-if="!isShowTable">
|
|
<el-radio-group v-model="syncForm.range">
|
|
<el-radio-group v-model="syncForm.range">
|
|
<el-radio
|
|
<el-radio
|
|
v-for="item in rangeOptions"
|
|
v-for="item in rangeOptions"
|
|
@@ -1961,7 +1961,7 @@
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="选择同步源" prop="templateId" v-else>
|
|
<el-form-item label="选择同步源" prop="templateId" v-else>
|
|
- <el-select v-model="syncForm.templateId" placeholder="请选择同步源" style="width: 100%;" size="small">
|
|
|
|
|
|
+ <el-select v-model="syncForm.templateId" placeholder="请选择同步源" style="width: 100%;" size="small" @change="changeTemplateId">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in templateIdList"
|
|
v-for="item in templateIdList"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
@@ -1976,6 +1976,7 @@
|
|
<el-table
|
|
<el-table
|
|
|
|
|
|
size="small"
|
|
size="small"
|
|
|
|
+ ref="proTable"
|
|
:data="preTableData"
|
|
:data="preTableData"
|
|
stripe
|
|
stripe
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -1987,17 +1988,19 @@
|
|
width="55">
|
|
width="55">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="date"
|
|
|
|
|
|
+ prop="tableName"
|
|
label="表单名称"
|
|
label="表单名称"
|
|
width="180">
|
|
width="180">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="name"
|
|
|
|
|
|
+ prop="tableType"
|
|
|
|
+ :formatter="formatTableType"
|
|
label="表单类型"
|
|
label="表单类型"
|
|
width="180">
|
|
width="180">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="address"
|
|
|
|
|
|
+ prop="tableOwner"
|
|
|
|
+ :formatter="formatOwner"
|
|
label="所属方">
|
|
label="所属方">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -2062,9 +2065,9 @@ import {
|
|
getLinekNodeTreelist,getNameRule,getTitleRange,saveOrUpdateNameRule,deletedNameRule
|
|
getLinekNodeTreelist,getNameRule,getTitleRange,saveOrUpdateNameRule,deletedNameRule
|
|
} from "@/api/manager/wbsprivate";
|
|
} from "@/api/manager/wbsprivate";
|
|
import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
|
|
import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
|
|
-import { findProjectTreeTrial as getAlltreeTrial } from "@/api/manager/projectinfo";
|
|
|
|
|
|
+
|
|
import { refrehPram } from "@/api/manager/wbstree";
|
|
import { refrehPram } from "@/api/manager/wbstree";
|
|
-import { getTableElments } from "@/api/manager/wbstree";
|
|
|
|
|
|
+
|
|
import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
|
|
import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
|
|
import { getDictionary, getChildList } from "@/api/system/dict";
|
|
import { getDictionary, getChildList } from "@/api/system/dict";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
@@ -2077,6 +2080,7 @@ import {
|
|
import { getStore, setStore } from "@/util/store";
|
|
import { getStore, setStore } from "@/util/store";
|
|
|
|
|
|
import { getTempProject,addSync } from "@/api/manager/ledger";
|
|
import { getTempProject,addSync } from "@/api/manager/ledger";
|
|
|
|
+import { selectByNodeTable as findNodeTableByCondition1 } from "@/api/manager/wbstree";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -2432,13 +2436,7 @@ export default {
|
|
contractRangeName:'',
|
|
contractRangeName:'',
|
|
formIds:''
|
|
formIds:''
|
|
},
|
|
},
|
|
- preTableData:
|
|
|
|
- [{
|
|
|
|
- date: '2016-05-03',
|
|
|
|
- name: '王小虎',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ preTableData:[],
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
checkIdList:[
|
|
checkIdList:[
|
|
|
|
|
|
@@ -4095,10 +4093,16 @@ export default {
|
|
|
|
|
|
syncNodeTableHandle(data) {
|
|
syncNodeTableHandle(data) {
|
|
console.log('后管数据同步',data);
|
|
console.log('后管数据同步',data);
|
|
- this.syncForm.size='1'
|
|
|
|
|
|
+ this.syncForm.range='1'
|
|
this.proSyncTag=true
|
|
this.proSyncTag=true
|
|
this.isShowLeft=false
|
|
this.isShowLeft=false
|
|
this.isShowTable=true
|
|
this.isShowTable=true
|
|
|
|
+ this.getTypeOptions()
|
|
|
|
+ this.getRangeOptions()
|
|
|
|
+ this.getCheckIdList()
|
|
|
|
+ console.log(data.primaryKeyId,'ids');
|
|
|
|
+
|
|
|
|
+ this.getTempProjectList(data.primaryKeyId)
|
|
|
|
|
|
},
|
|
},
|
|
syncProjectHandle(data) {
|
|
syncProjectHandle(data) {
|
|
@@ -4135,10 +4139,20 @@ export default {
|
|
//同步元素表单排序到合同段
|
|
//同步元素表单排序到合同段
|
|
syncSortHandle(data) {
|
|
syncSortHandle(data) {
|
|
console.log('同步到合同');
|
|
console.log('同步到合同');
|
|
- this.syncForm.size='2'
|
|
|
|
|
|
+ this.syncForm.range='2'
|
|
this.proSyncTag=true
|
|
this.proSyncTag=true
|
|
this.isShowLeft=false
|
|
this.isShowLeft=false
|
|
this.isShowTable=true
|
|
this.isShowTable=true
|
|
|
|
+ this.getTypeOptions()
|
|
|
|
+ this.getRangeOptions()
|
|
|
|
+ this.getCheckIdList()
|
|
|
|
+ selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
|
|
|
|
+ if (res.data.data.length) {
|
|
|
|
+ this.preTableData = res.data.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.preTableData = [];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
},
|
|
},
|
|
typeTreeLoadNode(node, resolve) {
|
|
typeTreeLoadNode(node, resolve) {
|
|
@@ -4714,6 +4728,41 @@ export default {
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async changeTemplateId(val){
|
|
|
|
+
|
|
|
|
+ let type=''
|
|
|
|
+ let projectId=''
|
|
|
|
+ for (let index = 0; index < this.templateIdList.length; index++) {
|
|
|
|
+ const elemet = this.templateIdList[index];
|
|
|
|
+ if(elemet.id==val){
|
|
|
|
+ type = elemet.type;
|
|
|
|
+ projectId=elemet.id
|
|
|
|
+
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(type===2){
|
|
|
|
+ selectByNodeTable(this.curTreeData.id, projectId, this.id).then((res) => {
|
|
|
|
+ if (res.data.data.length) {
|
|
|
|
+ this.preTableData = res.data.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.preTableData = [];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ const { data: res } = await findNodeTableByCondition1( this.curTreeData.id )
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ console.log(Array.isArray(res.data));
|
|
|
|
+ if (Array.isArray(res.data)) {
|
|
|
|
+ this.preTableData = res.data
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.preTableData = []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
async getCheckIdList(){
|
|
async getCheckIdList(){
|
|
let code=this.wbsType!==1?'wbs_sync_contract_range':'wbs_sync_contract_quality'
|
|
let code=this.wbsType!==1?'wbs_sync_contract_range':'wbs_sync_contract_quality'
|
|
getDictionary({
|
|
getDictionary({
|
|
@@ -4724,7 +4773,24 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
closeProSyncTag(){
|
|
closeProSyncTag(){
|
|
- this.syncForm={}
|
|
|
|
|
|
+ this.syncForm={
|
|
|
|
+ range:'',
|
|
|
|
+ rangeName:'',
|
|
|
|
+ type:[],
|
|
|
|
+ typeName:'',
|
|
|
|
+ templateId:'',
|
|
|
|
+ templateName:'',
|
|
|
|
+ contractRange:[],
|
|
|
|
+ contractRangeName:'',
|
|
|
|
+ formIds:''};
|
|
|
|
+
|
|
|
|
+ if(this.$refs.syncProTree){
|
|
|
|
+ this.$refs.syncProTree.setCheckedKeys([])
|
|
|
|
+ }
|
|
|
|
+ if(this.$refs.proTable){
|
|
|
|
+ this.refs.proTable.clearSelection()
|
|
|
|
+ }
|
|
|
|
+ this.preTableData=[]
|
|
},
|
|
},
|
|
saveProTag(){
|
|
saveProTag(){
|
|
console.log(this.syncForm,'this.syncForm');
|
|
console.log(this.syncForm,'this.syncForm');
|
|
@@ -4736,8 +4802,10 @@ export default {
|
|
contractRange:this.syncForm.contractRange.join(',')
|
|
contractRange:this.syncForm.contractRange.join(',')
|
|
}
|
|
}
|
|
).then((res) => {
|
|
).then((res) => {
|
|
|
|
+ this.saveProTagLoading=false
|
|
if(res.data.code==200){
|
|
if(res.data.code==200){
|
|
this.$message.success(res.data.msg)
|
|
this.$message.success(res.data.msg)
|
|
|
|
+ this.closeProSyncTag()
|
|
|
|
|
|
}else{
|
|
}else{
|
|
this.$message.error(res.data.msg)
|
|
this.$message.error(res.data.msg)
|
|
@@ -4756,7 +4824,15 @@ export default {
|
|
this.isIndeterminate = checkedCount > 0 && checkedCount < this.typeOptions.length;
|
|
this.isIndeterminate = checkedCount > 0 && checkedCount < this.typeOptions.length;
|
|
},
|
|
},
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
- this.multipleSelection = val;
|
|
|
|
|
|
+ let arr = []
|
|
|
|
+ if(val.length>0){
|
|
|
|
+ for (let index = 0; index < val.length; index++) {
|
|
|
|
+ let i = val[index];
|
|
|
|
+ arr.push(i.id)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.syncForm.formIds=arr.join(',')
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handleCommand(command){
|
|
handleCommand(command){
|
|
// this.$message('click on item ' + command);
|
|
// this.$message('click on item ' + command);
|
|
@@ -4806,18 +4882,10 @@ export default {
|
|
},
|
|
},
|
|
'syncForm.templateId': {
|
|
'syncForm.templateId': {
|
|
handler(newVal) {
|
|
handler(newVal) {
|
|
- // if (newVal && newVal.length) {
|
|
|
|
- // const selectedValues = newVal.map(key => {
|
|
|
|
- // const item = this.templateIdList.find(item => item.dictKey === key);
|
|
|
|
- // return item ? item.dictValue : key;
|
|
|
|
- // });
|
|
|
|
- // this.syncForm.templateName = selectedValues.join(',');
|
|
|
|
- // } else {
|
|
|
|
- // this.syncForm.templateName = '';
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
if (newVal && newVal.length) {
|
|
if (newVal && newVal.length) {
|
|
for (let index = 0; index < this.templateIdList.length; index++) {
|
|
for (let index = 0; index < this.templateIdList.length; index++) {
|
|
- const elemet = this.rangeOptions[index];
|
|
|
|
|
|
+ const elemet = this.templateIdList[index];
|
|
if(elemet.id==newVal){
|
|
if(elemet.id==newVal){
|
|
this.syncForm.templateName = elemet.name;
|
|
this.syncForm.templateName = elemet.name;
|
|
break
|
|
break
|