|
@@ -2012,6 +2012,78 @@
|
|
<el-button type="primary" @click="saveProTag" :loading="saveProTagLoading">确 定</el-button>
|
|
<el-button type="primary" @click="saveProTag" :loading="saveProTagLoading">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <!-- 同步队列 -->
|
|
|
|
+ <!-- 同步表单其他配置 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="同步表单其他配置"
|
|
|
|
+ :visible.sync="syncTableDialog"
|
|
|
|
+ width="70%"
|
|
|
|
+ append-to-body
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ >
|
|
|
|
+ <div class="sync-container">
|
|
|
|
+ <el-card class="box-card-1" :style="{ width: isShowLeft ? '40%' : '0%' }">
|
|
|
|
+ <el-scrollbar style="height: 100%;">
|
|
|
|
+ <div >
|
|
|
|
+ <el-tree
|
|
|
|
+ class="filter-tree"
|
|
|
|
+ lazy
|
|
|
|
+ :load="loadNode"
|
|
|
|
+ @node-click="handleNodeClick"
|
|
|
|
+
|
|
|
|
+ :props="defaultProps"
|
|
|
|
+ :expand-on-click-node="false"
|
|
|
|
+ highlight-current
|
|
|
|
+ node-key="primaryKeyId"
|
|
|
|
+ >
|
|
|
|
+ </el-tree>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </el-card>
|
|
|
|
+ <el-card class="box-card-2">
|
|
|
|
+
|
|
|
|
+ <div class="table-box">
|
|
|
|
+ <h4 style="margin-left: 4px;">表单预览</h4>
|
|
|
|
+ <el-table
|
|
|
|
+ size="small"
|
|
|
|
+ ref="proTable1"
|
|
|
|
+ :data="preTableData1"
|
|
|
|
+ stripe
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ max-height="300"
|
|
|
|
+ @selection-change="handleSelectionChange1"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column
|
|
|
|
+ type="selection"
|
|
|
|
+ width="55">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="tableName"
|
|
|
|
+ label="表单名称"
|
|
|
|
+ width="180">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="tableType"
|
|
|
|
+ :formatter="formatTableType"
|
|
|
|
+ label="表单类型"
|
|
|
|
+ width="180">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="tableOwner"
|
|
|
|
+ :formatter="formatOwner"
|
|
|
|
+ label="所属方">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ </el-card>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="syncTableDialog = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="saveTableSync" :loading="saveTableSyncLoad">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -2445,6 +2517,11 @@ export default {
|
|
isShowTable:false,
|
|
isShowTable:false,
|
|
templateIdList:[],//同步源
|
|
templateIdList:[],//同步源
|
|
saveProTagLoading:false,
|
|
saveProTagLoading:false,
|
|
|
|
+ syncTableDialog:false,
|
|
|
|
+ preTableData1:[],
|
|
|
|
+ formIds:'',
|
|
|
|
+ saveTableSyncLoad:false,
|
|
|
|
+ checkRow:null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -4861,32 +4938,91 @@ export default {
|
|
handleCommand(command,row){
|
|
handleCommand(command,row){
|
|
// this.$message('click on item ' + command);
|
|
// this.$message('click on item ' + command);
|
|
console.log(row,'row');
|
|
console.log(row,'row');
|
|
|
|
+ console.log(command,'command');
|
|
|
|
+ this.checkRow=row
|
|
|
|
+ if(command==='a'){
|
|
|
|
+ this.$confirm("当前表单配置将同步到项目下所有相同表单,请谨慎同步!!!!!!", "表单同步提醒", {
|
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ addSync({
|
|
|
|
+ projectId:this.projectid,
|
|
|
|
+ range:command.name==='3',
|
|
|
|
+ nodeId:row.pkeyId,
|
|
|
|
+ nodeName:this.curTreeData.title,
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ ).then((res) => {
|
|
|
|
+
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ this.$message.success(res.data.msg)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }else if(command==='b'){
|
|
|
|
+ console.log(111111111111111);
|
|
|
|
+
|
|
|
|
+ this.syncTableDialog=true
|
|
|
|
+ if(this.$refs.proTable1){
|
|
|
|
+ this.$refs.proTable1.clearSelection()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
- this.$confirm("当前表单配置将同步到项目下所有相同表单,请谨慎同步!!!!!!", "表单同步提醒", {
|
|
|
|
- distinguishCancelAndClose: true,
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- }).then(() => {
|
|
|
|
- addSync({
|
|
|
|
- projectId:this.projectid,
|
|
|
|
- range:command.name==='a'?3:4,
|
|
|
|
- nodeId:this.curTreeData.primaryKeyId,
|
|
|
|
- nodeName:this.curTreeData.title,
|
|
|
|
- formIds:row.id,
|
|
|
|
- }
|
|
|
|
- ).then((res) => {
|
|
|
|
- this.saveProTagLoading=false
|
|
|
|
- if(res.data.code==200){
|
|
|
|
- this.$message.success(res.data.msg)
|
|
|
|
- this.closeProSyncTag()
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.data.msg)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ saveTableSync(){
|
|
|
|
+ this.saveTableSyncLoad=true
|
|
|
|
+ addSync({
|
|
|
|
+ projectId:this.projectid,
|
|
|
|
+ range:'4',
|
|
|
|
+ nodeId:this.checkRow.pkeyId,
|
|
|
|
+ nodeName:this.curTreeData.title,
|
|
|
|
+ formIds:this.formIds,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ this.saveTableSyncLoad=false
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ this.$message.success(res.data.msg)
|
|
|
|
+ this.syncTableDialog=false
|
|
|
|
+ this.$refs.proTable1.clearSelection()
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.saveTableSyncLoad=false
|
|
|
|
+ },
|
|
|
|
+ handleNodeClick(data) {
|
|
|
|
+
|
|
|
|
+ selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
|
|
|
|
+ if (res.data.data.length) {
|
|
|
|
+ this.preTableData1 = res.data.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.preTableData1 = [];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange1(val) {
|
|
|
|
+ let arr = []
|
|
|
|
+ if(val.length>0){
|
|
|
|
+ for (let index = 0; index < val.length; index++) {
|
|
|
|
+ let i = val[index];
|
|
|
|
+ arr.push(i.id)
|
|
|
|
+ }
|
|
|
|
+ this.formIds=arr.join(',')
|
|
|
|
+
|
|
|
|
+ // this.syncForm.formIds=arr.join(',')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
"GLExcelFrom.search"(val) {
|
|
"GLExcelFrom.search"(val) {
|