|
@@ -17,39 +17,13 @@
|
|
|
<!-- 同步按钮 -->
|
|
|
<el-button
|
|
|
size="medium"
|
|
|
- icon="el-icon-arrow-down"
|
|
|
style="margin-right: 10px"
|
|
|
- @click="showSyncbtn"
|
|
|
- v-show="!isshowSyncbtn"
|
|
|
- >数据同步
|
|
|
+ @click="proSyncbtn"
|
|
|
+ >项目数据同步
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- size="medium"
|
|
|
- icon="el-icon-arrow-up"
|
|
|
- style="margin-right: 10px"
|
|
|
- @click="showSyncbtn"
|
|
|
- v-show="isshowSyncbtn"
|
|
|
- >数据同步
|
|
|
- </el-button>
|
|
|
- <!-- <el-select v-model="menuvalue" placeholder="数据同步" class="selectBtn" v-if="isshowSyncbtn">
|
|
|
- <el-option
|
|
|
- v-for="item in menuoptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- <span style="float: left">{{ item.label }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select> -->
|
|
|
- <ul v-show="isshowSyncbtn" class="contextmenu selectBtn">
|
|
|
- <li
|
|
|
- v-for="item in menuoptions"
|
|
|
- :key="item"
|
|
|
- @click="menuClick($event, item, data)"
|
|
|
- v-loading="item.load"
|
|
|
- >
|
|
|
- {{ item.label }}
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<el-button
|
|
|
size="medium"
|
|
@@ -66,15 +40,7 @@
|
|
|
>元素设置
|
|
|
</el-button>
|
|
|
|
|
|
- <!-- <el-button
|
|
|
- class="el-btn-purple"
|
|
|
- type="primary"
|
|
|
- size="medium"
|
|
|
- icon="el-icon-upload"
|
|
|
- :loading="syncBtnLoad"
|
|
|
- @click="syncInfoHandle"
|
|
|
- >同步节点参数</el-button
|
|
|
- > -->
|
|
|
+
|
|
|
|
|
|
<el-button size="medium" icon="el-icon-help" @click="nodeInfoHandle"
|
|
|
>节点参数设置
|
|
@@ -93,16 +59,7 @@
|
|
|
@click="archiveTimeClick"
|
|
|
>归档文件时间设置
|
|
|
</el-button>
|
|
|
- <!-- <el-button
|
|
|
- :loading="syncElectricLoad"
|
|
|
- style="margin-top:10px"
|
|
|
- class="el-btn-purple"
|
|
|
- type="primary"
|
|
|
- size="medium"
|
|
|
- icon="el-icon-upload"
|
|
|
- @click="syncElectric"
|
|
|
- >同步电签默认信息</el-button
|
|
|
- > -->
|
|
|
+
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -295,18 +252,7 @@
|
|
|
<div class="flex jc-sb">
|
|
|
<p>
|
|
|
<span>当前项目信息表</span>
|
|
|
- <!-- <el-button
|
|
|
- @click="showFormElement"
|
|
|
- type="text"
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
- class="text-icon mg-l-10"
|
|
|
- ></el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-document-copy"
|
|
|
- class="text-icon"
|
|
|
- ></el-button> -->
|
|
|
-
|
|
|
+
|
|
|
<el-button
|
|
|
type="text"
|
|
|
style="margin-left: 10px"
|
|
@@ -714,21 +660,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 私有wbs树排序弹框 -->
|
|
|
- <!-- <el-dialog
|
|
|
- title="调整排序"
|
|
|
- :visible.sync="sortTag"
|
|
|
- width="50%"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="(sortTag = false), (sortTag2 = false)"
|
|
|
- >取 消</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="editSort()">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog> -->
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="调整排序"
|
|
|
:visible.sync="sortTag"
|
|
@@ -1965,6 +1897,113 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 项目数据同步 -->
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+
|
|
|
+ :visible.sync="proSyncTag"
|
|
|
+ width="80%"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <span slot="title" class="dialog-title">
|
|
|
+ 项目数据同步
|
|
|
+ <span class="dialog-title-tip">重新同步项目下所有配置,不保留独有配置,慎重同步!!!</span>
|
|
|
+ </span>
|
|
|
+ <div class="sync-container">
|
|
|
+ <el-card class="box-card-1" :style="{ width: isShowLeft ? '40%' : '0%' }">
|
|
|
+ <el-scrollbar style="height: 100%;">
|
|
|
+ <div v-loading="treeLoad">
|
|
|
+ <el-tree
|
|
|
+ class="filter-tree"
|
|
|
+ lazy
|
|
|
+ :load="loadNode"
|
|
|
+ show-checkbox
|
|
|
+ :props="defaultProps"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ highlight-current
|
|
|
+ node-key="id"
|
|
|
+ ref="tree"
|
|
|
+ @check-change="handleCheckChange"
|
|
|
+ >
|
|
|
+
|
|
|
+ </el-tree>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </el-scrollbar>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card-2">
|
|
|
+ <el-form ref="syncForm" :model="syncForm" label-position="top">
|
|
|
+ <el-form-item label="同步范围">
|
|
|
+ <el-radio-group v-model="syncForm.size">
|
|
|
+ <el-radio label="1">从后管同步</el-radio>
|
|
|
+ <el-radio label="2">同步到合同段</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="同步类型" prop="type">
|
|
|
+ <el-checkbox-group v-model="syncForm.type">
|
|
|
+ <el-checkbox label="全选" ></el-checkbox>
|
|
|
+ <el-checkbox label="新增表单"></el-checkbox>
|
|
|
+ <el-checkbox label="表单排序" ></el-checkbox>
|
|
|
+ <el-checkbox label="电签配置"></el-checkbox>
|
|
|
+ <el-checkbox label="公式配置"></el-checkbox>
|
|
|
+ <el-checkbox label="默认值配置"></el-checkbox>
|
|
|
+ <el-checkbox label="清表配置" ></el-checkbox>
|
|
|
+ <el-checkbox label="元素配置"></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择同步范围(节点状态)" prop="checkId1" v-if="syncForm.size==='2'">
|
|
|
+ <el-checkbox-group v-model="syncForm.checkId1">
|
|
|
+ <el-checkbox label="全选" name="1"></el-checkbox>
|
|
|
+ <el-checkbox v-for="(item,index) in checkIdList" :key="index" :label="item.name" ></el-checkbox>
|
|
|
+
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择同步源" prop="checkId" v-else>
|
|
|
+ <el-select v-model="syncForm.checkId" placeholder="请选择同步源" style="width: 100%;" size="small">
|
|
|
+ <el-option label="区域一" value="shanghai"></el-option>
|
|
|
+ <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="table-box">
|
|
|
+ <h4 style="margin-left: 4px;">表单预览</h4>
|
|
|
+ <el-table
|
|
|
+ size="small"
|
|
|
+ :data="preTableData"
|
|
|
+ stripe
|
|
|
+ style="width: 100%"
|
|
|
+ max-height="300"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="表单名称"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="表单类型"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="所属方">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="closeProSyncTag">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveProTag">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -2033,6 +2072,7 @@ import {
|
|
|
import { getStore, setStore } from "@/util/store";
|
|
|
|
|
|
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
var checkMajorDataType = (rule, value, callback) => {
|
|
@@ -2268,22 +2308,18 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
icon: "el-icon-upload",
|
|
|
- label: "同步新增元素表单",
|
|
|
+ label: "后管数据同步",
|
|
|
key: "sync1",
|
|
|
- content: "同步新增元素表单",
|
|
|
+ content: "后管数据同步",
|
|
|
},
|
|
|
{
|
|
|
icon: "el-icon-upload",
|
|
|
- label: "同步元素表单排序到合同段",
|
|
|
+ label: "同步到合同段",
|
|
|
key: "sync3",
|
|
|
- content: "同步元素表单排序到合同段",
|
|
|
- },
|
|
|
- {
|
|
|
- icon: "el-icon-s-promotion",
|
|
|
- label: "同步节点基础信息及表单URL",
|
|
|
- key: "sync2",
|
|
|
- content: "同步节点的基础信息、类型名称、表单url等信息",
|
|
|
+ content: "同步到合同段",
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
{
|
|
|
icon: "el-icon-sort",
|
|
|
label: "调整排序",
|
|
@@ -2374,7 +2410,30 @@ export default {
|
|
|
chooseFileIndex: -1,
|
|
|
isShowSize:true,
|
|
|
selectDiv:Math.random(),
|
|
|
- saveFileLoading:false
|
|
|
+ saveFileLoading:false,
|
|
|
+ proSyncTag:false,
|
|
|
+ syncForm:{
|
|
|
+ size:'',
|
|
|
+ type:[],
|
|
|
+ checkId:'',
|
|
|
+ checkId1:[]
|
|
|
+ },
|
|
|
+ preTableData:
|
|
|
+ [{
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ multipleSelection: [],
|
|
|
+ checkIdList:[
|
|
|
+ {name:'未填报',value:'1'},
|
|
|
+ {name:'已填报-未上报',value:'2'},
|
|
|
+ {name:'待审批',value:'3'},
|
|
|
+ {name:'已审批',value:'4'},
|
|
|
+ ],
|
|
|
+ isShowLeft:true
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -4031,35 +4090,11 @@ export default {
|
|
|
},
|
|
|
|
|
|
syncNodeTableHandle(data) {
|
|
|
- this.$confirm("是否同步节点【" + data.title + "】?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- let notify = this.$notify({
|
|
|
- title: "提示",
|
|
|
- message: "节点数据同步中...",
|
|
|
- duration: 0,
|
|
|
- });
|
|
|
- let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
|
|
|
- syncNodeTable(pid)
|
|
|
- .then(() => {
|
|
|
- this.updateNodeTable();
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "同步成功",
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: "同步失败",
|
|
|
- });
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- notify.close();
|
|
|
- });
|
|
|
- });
|
|
|
+ console.log('后管数据同步',data);
|
|
|
+ this.syncForm.size='1'
|
|
|
+ this.proSyncTag=true
|
|
|
+ this.isShowLeft=false
|
|
|
+
|
|
|
},
|
|
|
syncProjectHandle(data) {
|
|
|
this.$confirm("是否同步节点【" + data.title + "】到合同段?", "提示", {
|
|
@@ -4094,35 +4129,11 @@ export default {
|
|
|
},
|
|
|
//同步元素表单排序到合同段
|
|
|
syncSortHandle(data) {
|
|
|
- let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
|
|
|
- this.$confirm("同步元素表单排序到合同段", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- let notify = this.$notify({
|
|
|
- title: "提示",
|
|
|
- message: "节点数据同步中...",
|
|
|
- duration: 0,
|
|
|
- });
|
|
|
- syncContractTabSort(this.projectid,pid)
|
|
|
- .then(() => {
|
|
|
- this.updateNodeTable();
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "同步成功",
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: "同步失败",
|
|
|
- });
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- notify.close();
|
|
|
- });
|
|
|
- });
|
|
|
+ console.log('同步到合同');
|
|
|
+ this.syncForm.size='2'
|
|
|
+ this.proSyncTag=true
|
|
|
+ this.isShowLeft=false
|
|
|
+
|
|
|
},
|
|
|
typeTreeLoadNode(node, resolve) {
|
|
|
let pid = 0;
|
|
@@ -4331,8 +4342,6 @@ export default {
|
|
|
this.sortpai(data);
|
|
|
} else if (item.key === "sync1") {
|
|
|
this.syncNodeTableHandle(data);
|
|
|
- } else if (item.key === "sync2") {
|
|
|
- this.syncProjectHandle(data);
|
|
|
} //
|
|
|
else if (item.key === "sync3") {
|
|
|
this.syncSortHandle(data);
|
|
@@ -4661,6 +4670,23 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ },
|
|
|
+ proSyncbtn(){
|
|
|
+ console.log('项目数据同步');
|
|
|
+ this.proSyncTag=true
|
|
|
+ this.isShowLeft=true
|
|
|
+ },
|
|
|
+ closeProSyncTag(){
|
|
|
+
|
|
|
+ },
|
|
|
+ saveProTag(){
|
|
|
+
|
|
|
+ },
|
|
|
+ handleCheckChange(data, checked, indeterminate) {
|
|
|
+ console.log(data, checked, indeterminate);
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val;
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -4786,6 +4812,45 @@ export default {
|
|
|
margin-left: -20px;
|
|
|
margin-right: -20px;
|
|
|
}
|
|
|
+.dialog-title-tip{
|
|
|
+ position: absolute;
|
|
|
+ color:rgba(255, 125, 67, 1);
|
|
|
+ right: 60px;
|
|
|
+ }
|
|
|
+.sync-container{
|
|
|
+ display: flex;
|
|
|
+ height: 650px;
|
|
|
+
|
|
|
+
|
|
|
+ .box-card-1{
|
|
|
+
|
|
|
+ margin-right: 10px;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ .box-card-2{
|
|
|
+ flex: 1;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ padding: 0 10px 10px 10px;
|
|
|
+
|
|
|
+ border-radius: 4px;
|
|
|
+ font-weight: bold;
|
|
|
+
|
|
|
+ .el-form-item__label {
|
|
|
+ font-weight: bold;
|
|
|
+ padding-bottom: 0px;
|
|
|
+ }
|
|
|
+ .el-form--label-top .el-form-item__label{
|
|
|
+ padding: 0px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|
|
@@ -4816,4 +4881,12 @@ export default {
|
|
|
.orange {
|
|
|
color: orange;
|
|
|
}
|
|
|
+.box-card-2{
|
|
|
+ .el-form-item {
|
|
|
+ .el-form-item__content {
|
|
|
+ line-height: 10px !important;
|
|
|
+ margin-top: -10px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+}
|
|
|
</style>
|