{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\TemplateCtrlFieldDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\TemplateCtrlFieldDialog.vue","mtime":1675071992178},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport form from '@/api/form.js'\r\n\r\nexport default {\r\n name: 'template-ctrl-field-dialog',\r\n components: {},\r\n props: {},\r\n data() {\r\n return {\r\n ctrlFiled: {},\r\n controlContentObject: {},\r\n controlContentArray: [],\r\n customDialogs: [],\r\n custDialogFields: [],\r\n dialogVisible: false,\r\n conditionFields: [],\r\n conditionfield: [],\r\n customQuerys: [],\r\n customQueryUrl: '/form/customQuery/v1/list',\r\n custDialogprop:{}\r\n }\r\n },\r\n created() {\r\n if (!this.ctrlFiled.option) {\r\n this.ctrlFiled.option = {\r\n choiceType: 'static',\r\n customQuery: {},\r\n }\r\n }\r\n },\r\n methods: {\r\n initData() {\r\n if (this.ctrlFiled.ct == 'customDialog') {\r\n if (this.ctrlFiled.controlContent) {\r\n this.controlContentObject = this.ctrlFiled.controlContent\r\n }\r\n if(this.ctrlFiled.custDialogprop && Object.keys(this.ctrlFiled.custDialogprop).length!=0){\r\n this.custDialogprop =this.ctrlFiled.custDialogprop;\r\n }\r\n this.changeDialog()\r\n form.getCustomDialogs().then((response) => {\r\n this.customDialogs = []\r\n if (response && response.length > 0) {\r\n response.forEach((d) => {\r\n this.customDialogs.push({key: d.alias, value: d.name})\r\n })\r\n }\r\n })\r\n } else {\r\n if (\r\n this.ctrlFiled.controlContent &&\r\n this.ctrlFiled.controlContent.length > 0\r\n ) {\r\n this.controlContentArray = this.ctrlFiled.controlContent\r\n } else {\r\n this.controlContentArray = []\r\n }\r\n }\r\n },\r\n handleClose() {\r\n this.dialogVisible = false\r\n },\r\n showDialog(row, conditionFields) {\r\n this.ctrlFiled = row\r\n if (conditionFields) {\r\n conditionFields.forEach((item) => {\r\n item.value = item.colPrefix + item.na\r\n })\r\n }\r\n this.conditionFields = conditionFields\r\n\r\n this.dialogVisible = true\r\n this.initData()\r\n },\r\n addControlContent() {\r\n this.controlContentArray.push({key: '', value: ''})\r\n },\r\n changeDialog() {\r\n if (this.controlContentObject.alias) {\r\n const this_ = this\r\n form\r\n .getCustomDialogByAlias(this.controlContentObject.alias)\r\n .then((response) => {\r\n this.custDialogFields = []\r\n //this.controlContentObject.resultField = ''\r\n if (response && response.resultfield) {\r\n let fields = JSON.parse(response.resultfield)\r\n fields.forEach((f) => {\r\n this.custDialogFields.push({key: f.comment, value: f.comment})\r\n })\r\n }\r\n if (response && response.conditionfield) {\r\n this.conditionfield = JSON.parse(response.conditionfield)\r\n if (this_.ctrlFiled.bind) {\r\n this.conditionfield.forEach((conf) => {\r\n this_.ctrlFiled.bind.forEach((fbind) => {\r\n if (\r\n !conf.bind &&\r\n conf.field.toLowerCase() == fbind.field.toLowerCase()\r\n ) {\r\n this_.$set(conf, 'bind', fbind.bind)\r\n }\r\n })\r\n })\r\n }\r\n }\r\n })\r\n }\r\n },\r\n onConfirm(selection) {\r\n if (this.ctrlFiled.ct == 'customDialog') {\r\n this.ctrlFiled.controlContent = this.controlContentObject\r\n if (this.conditionfield && this.conditionfield.length > 0) {\r\n this.ctrlFiled.bind = this.conditionfield\r\n }\r\n if(Object.keys(this.custDialogprop).length!=0){\r\n this.ctrlFiled.custDialogprop=this.custDialogprop;\r\n }\r\n } else {\r\n this.ctrlFiled.controlContent = this.controlContentArray\r\n }\r\n this.dialogVisible = false\r\n this.$emit('onConfirm', this.ctrlFiled)\r\n },\r\n //显示字段排序\r\n sort(index, type) {\r\n if ('up' == type) {\r\n if (index === 0) {\r\n this.$message({\r\n message: '已经是列表中第一位',\r\n type: 'warning',\r\n })\r\n } else {\r\n let temp = this.controlContentArray[index - 1]\r\n this.$set(\r\n this.controlContentArray,\r\n index - 1,\r\n this.controlContentArray[index]\r\n )\r\n this.$set(this.controlContentArray, index, temp)\r\n }\r\n } else {\r\n if (index === this.controlContentArray.length - 1) {\r\n this.$message({\r\n message: '已经是列表中最后一位',\r\n type: 'warning',\r\n })\r\n } else {\r\n let i = this.controlContentArray[index + 1]\r\n this.$set(\r\n this.controlContentArray,\r\n index + 1,\r\n this.controlContentArray[index]\r\n )\r\n this.$set(this.controlContentArray, index, i)\r\n }\r\n }\r\n },\r\n //删除显示字段\r\n remove(index) {\r\n this.controlContentArray.splice(index, 1)\r\n },\r\n changeResultField() {\r\n this.$forceUpdate()\r\n },\r\n //切换固定选项和动态选项时\r\n dynamicClick() {\r\n this.controlContentArray = []\r\n this.customQueryUrl = '/form/customQuery/v1/list'\r\n this.ctrlFiled.option.customQuery = {\r\n valueBind: '',\r\n labelBind: '',\r\n conditionfield: [],\r\n custQueryJson: [],\r\n }\r\n this.ctrlFiled.option.bind = []\r\n this.ctrlFiled.option.options = []\r\n if (this.ctrlFiled.option.choiceType == 'dynamic') {\r\n this.ctrlFiled.option.linkage = []\r\n }\r\n },\r\n afterCustomQueryLoadData(data) {\r\n this.customQuerys = data.rows\r\n },\r\n //选择动态选项\r\n setCurrentCustomQuery() {\r\n const _this = this\r\n _this.ctrlFiled.option.customQuery.custQueryJson = []\r\n _this.customQuerys.forEach((item) => {\r\n if (_this.ctrlFiled.option.customQuery.alias == item.alias) {\r\n if (typeof item.conditionfield == 'string') {\r\n item.conditionfield = JSON.parse(item.conditionfield) //parseToJson(item.customQuery.conditionfield);\r\n item.resultfield = JSON.parse(item.resultfield) // parseToJson(item.customQuery.resultfield);\r\n }\r\n //把当前对象克隆一份到控件属性配置\r\n Object.assign(_this.ctrlFiled.option.customQuery, item)\r\n // _this.slimCustomQuery(_this.ctrlFiled.option.customQuery);\r\n }\r\n })\r\n //删除掉无效的参数\r\n var bind = []\r\n this.ctrlFiled.option.customQuery.conditionfield.forEach((item) => {\r\n if (item.defaultType == 1) {\r\n bind.push(item)\r\n }\r\n })\r\n this.ctrlFiled.option.bind = bind\r\n //切换关联数据设置项或下拉框动态值 同时清空绑定返回值、参数绑定、选项绑定\r\n this.custDialogprop = {}\r\n this.ctrlFiled.option.gangedBind = {}\r\n this.ctrlFiled.option.customQuery.valueBind = ''\r\n this.ctrlFiled.option.customQuery.labelBind = ''\r\n if (this.ctrlFiled.option.customQuery.conditionfield) {\r\n this.ctrlFiled.option.customQuery.conditionfield.forEach((element) => {\r\n this.$set(element, 'fieldPath', '')\r\n })\r\n }\r\n },\r\n },\r\n}\r\n",null]}