| | |
| | | :data="data" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @row-del="rowDelHandler" |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | |
| | | <span v-else-if="form.templateType === '6'">对象类型</span> |
| | | <span v-else-if="form.searchTarger === '1'">源对象</span> |
| | | <span v-else-if="form.searchTarger === '2'">目标对象</span> |
| | | </template> |
| | | |
| | | <template slot="extAttrLabel" slot-scope="{}"> |
| | | <el-tooltip placement="top"> |
| | | <div slot="content">示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx; |
| | | <br/>1、用英交半角分号:分隔各组值; |
| | | <br/>2、每组用英交半角冒号:分隔单一扩展属性名称及属性值; |
| | | <br/>3、可以定义任意组,但总字符长度不得超过4000; |
| | | <br/>4、输入时,不要敲回车换行; |
| | | </div> |
| | | <span>扩展属性 <i class="el-icon-warning" style="color:red;"></i> </span> |
| | | </el-tooltip> |
| | | </template> |
| | | |
| | | <template slot="uiParserLabel" slot-scope="{}"> |
| | | <el-tooltip placement="top"> |
| | | <div slot="content">示例:java_cs;xxx.java_bs;xxx.net_cs;xxxx.net_bs;xxx.mobile_cs;xx.mobile_bs;xxx; |
| | | <br/>1、用英文半角分号;分割各组值;(这里结尾的是中文字符的分号) |
| | | <br/>2、每组用英文半角冒号:分隔单一扩展属性名称及属性值; |
| | | <br/>3、其中的xxx是各种解析类的完整类型名称(完全限定名); |
| | | <br/>4、输入时,不要敲回车换行; |
| | | </div> |
| | | <span>UI解析类型 <i class="el-icon-warning" style="color:red;"></i> </span> |
| | | </el-tooltip> |
| | | </template> |
| | | |
| | | <template slot="templateIdForm" slot-scope="{}"> |
| | | <el-select v-model="form.templateId" filterable placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in templateIdList" |
| | | :key="item.viName" |
| | | :label="item.viName" |
| | | :value="item.viName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | |
| | | <template slot="queryTemplateNameForm" slot-scope="{}"> |
| | | <el-select v-model="form.queryTemplateName" filterable placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in queryTemplateNameList" |
| | | :key="item.qtName" |
| | | :label="item.qtName" |
| | | :value="item.qtName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | |
| | | deleteTabButton, |
| | | delPageDefination, |
| | | joinBtn, |
| | | exitBtn |
| | | exitBtn, |
| | | updatePageDefination, |
| | | getPortalVIDatasByPage, |
| | | getQTInfoDatasByPage |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/Aciton/components/dialog'; |
| | | import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog"; |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | queryTemplateNameList: [], |
| | | templateIdList: [], |
| | | searchTargerChangeFlag: false, |
| | | showTypeChangeFlag: false, |
| | | linkTypeChangeFlag: false, |
| | | formBtnOid: '', |
| | | sourceBtnOid: '', |
| | | sourceOId: '', |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: 'UI解析类型', |
| | | label: '', |
| | | prop: 'uiParser', |
| | | hide: true, |
| | | labelWidth: 100, |
| | | }, |
| | | { |
| | | label: '扩展属性', |
| | | label: '', |
| | | prop: 'extAttr', |
| | | hide: true, |
| | | }, |
| | |
| | | }, |
| | | change: (val) => { |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'searchObjType', 'queryTemplateName', 'controlPath', 'expandCols', 'rootContent', 'showAbs', 'showLinkAbs', 'separator'] |
| | | list.forEach(item => { |
| | | this.form[item] = ""; |
| | | }) |
| | | // list.forEach(item => { |
| | | // this.form[item] = ""; |
| | | // }) |
| | | // this.form.searchTarger = '1' |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 获取搜索类型配置项 |
| | | searchTarger.display = true; // 切换默认展示搜索类型 |
| | | // 模板类型为表格 |
| | |
| | | dicData: [ |
| | | { |
| | | label: '不显示', |
| | | value: '3' |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '显示角色', |
| | |
| | | }, |
| | | { |
| | | label: '显示Folder', |
| | | value: '1', |
| | | value: '3', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | const obj = this.option.group[0].column.find(item => item.prop === 'linkType'); |
| | | obj.display = val.value !== '1'; |
| | | } |
| | | // 切换清空模板类型 |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType']; |
| | | list.forEach(item => { |
| | | this.form[item] = ''; |
| | | }) |
| | | |
| | | if (this.searchTargerChangeFlag) { |
| | | // 切换清空模板类型 |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']; |
| | | list.forEach(item => { |
| | | this.form[item] = ''; |
| | | }) |
| | | } else { |
| | | this.searchTargerChangeFlag = true; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: '源对象', |
| | | prop: 'showType', |
| | | type: 'select', |
| | | cascader: ['linkType', 'templateId', 'SubUILayout', 'searchObjType', 'queryTemplateName'], |
| | | cascader: ['linkType', 'SubUILayout', 'searchObjType'], |
| | | placeholder: "请输入内容", |
| | | dicUrl: '/api/uiManagerController/getBtmDatasByPage?page=1&limit=-1', |
| | | filterable: true, |
| | | change: (val) => { |
| | | if (val.value) { |
| | | let params = { |
| | | 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? this.form.showType : this.form.linkType |
| | | } |
| | | getPortalVIDatasByPage(1, -1, params).then(res => { |
| | | this.templateIdList = res.data.data; |
| | | }) |
| | | getQTInfoDatasByPage(1, -1, params).then(res => { |
| | | this.queryTemplateNameList = res.data.data; |
| | | }) |
| | | } |
| | | if (this.showTypeChangeFlag) { |
| | | if (val.value) { |
| | | if (this.form.searchTarger === '1') { |
| | | this.form.templateId = ""; |
| | | this.form.queryTemplateName = ""; |
| | | } else { |
| | | this.form.linkType = ""; |
| | | this.form.templateId = ""; |
| | | this.form.queryTemplateName = ""; |
| | | } |
| | | } |
| | | } else { |
| | | this.showTypeChangeFlag = true; |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'name', |
| | | value: 'name', |
| | |
| | | desc: 'tag' |
| | | }, |
| | | dicUrl: '/api/uiManagerController/getLinkDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | change: (val) => { |
| | | if (val.value) { |
| | | let params = { |
| | | 'conditionMap[selectBtmType]': val.value |
| | | } |
| | | getPortalVIDatasByPage(1, -1, params).then(res => { |
| | | this.templateIdList = res.data.data; |
| | | }) |
| | | getQTInfoDatasByPage(1, -1, params).then(res => { |
| | | this.queryTemplateNameList = res.data.data; |
| | | }) |
| | | } |
| | | if (this.linkTypeChangeFlag) { |
| | | if (val.value) { |
| | | this.form.templateId = ""; |
| | | this.form.queryTemplateName = ""; |
| | | } |
| | | } else { |
| | | this.linkTypeChangeFlag = true; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: '选择模板', |
| | | prop: 'templateId', |
| | | display: false, |
| | | type: 'select', |
| | | filterable: true, |
| | | dicUrl: '/api/uiManagerController/getPortalVIDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | formslot: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | trigger: 'submit' |
| | | } |
| | | ], |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName', |
| | | desc: 'viType' |
| | | }, |
| | | }, |
| | | { |
| | | label: 'UI定义', |
| | |
| | | filterable: true, |
| | | display: false, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName', |
| | | desc: 'btmName' |
| | | label: 'plName', |
| | | value: 'plCode', |
| | | }, |
| | | dicUrl: '/api/uiManagerController/getUILayoutDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | }, |
| | |
| | | label: '查询模板', |
| | | prop: 'queryTemplateName', |
| | | type: 'select', |
| | | filterable: true, |
| | | display: false, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName', |
| | | desc: 'btmName' |
| | | }, |
| | | dicUrl: '/api/uiManagerController/getQTInfoDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | formslot: true, |
| | | }, |
| | | { |
| | | label: '控制路径', |
| | |
| | | prop: 'showAbs', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'B/S自定义查询', |
| | | prop: 'bsCustQueryCLsOrUrl', |
| | | display: false, |
| | | labelWidth: 115, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'C/S自定义查询', |
| | | prop: 'csCustQueryCLsOrUrl', |
| | | display: false, |
| | | labelWidth: 115, |
| | | span: 12 |
| | | }, |
| | | ] |
| | |
| | | |
| | | // 增加 |
| | | addClickHandler() { |
| | | console.log(this.sourceData); |
| | | if (!this.sourceData || !this.sourceData.plOId) { |
| | | this.$message.error('请在上方选择一条数据后进行添加'); |
| | | return; |
| | | } |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | |
| | | // 编辑打开表单前 |
| | | beforeOpen(done, type) { |
| | | if (type === 'edit') { |
| | | this.form.showType = 'Ludc'; |
| | | this.$set(this.form, 'showType', 'Ludc'); |
| | | // this.$set(this.option.group[0].column[0],'value','Ludc'); |
| | | // this.option.group[0].column[0].value = 'Ludc'; |
| | | done(); |
| | | } else { |
| | | done(); |
| | | } |
| | | }, |
| | | |
| | | // 增加关闭对话框 清空event数组 |
| | |
| | | }; |
| | | }); |
| | | } |
| | | this.searchTargerChangeFlag = false; |
| | | this.$refs.crud.rowEdit(row); |
| | | console.log(this.form); |
| | | }, |
| | | |
| | | // 删除 |
| | | rowDeleteHandler(row) { |
| | | console.log(row); |
| | | this.$confirm('您确定要删除所选择的数据吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | console.log(this.sourceData); |
| | | const params = { |
| | | ...row, |
| | | tabPageOId: this.sourceData.plOId |
| | | } |
| | | addPageDefination(params).then(res => { |
| | | console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err => { |
| | | loading(); |
| | | }) |
| | | }, |
| | | |
| | | rowUpdateHandler(row, index, done, loading) { |
| | | if (row.templateType === '6') { |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | const params = { |
| | | ...row, |
| | | tabPageOId: this.sourceData.plOId |
| | | } |
| | | updatePageDefination(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | |
| | | // 模板类型为表格 |
| | | templateTypeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模板类型为自定义模板 |
| | |
| | | // 模板类型为树表 |
| | | templateTypeTreeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'zkfs']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模板类型为表单 |
| | | templateTypeForm(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模板类型为树 |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 获取搜索类型配置项 |
| | | searchTarger.display = false; // 不展示搜索类型 |
| | | this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']); |
| | | this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模板类型为UI定义 |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 获取搜索类型配置项 |
| | | searchTarger.display = false; // 不展示搜索类型 |
| | | this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 查找数组中对象索引 |
| | |
| | | this.$message.error('请选择一条数据'); |
| | | return; |
| | | } |
| | | console.log(this.selectList); |
| | | this.btnDesignVisible = true; |
| | | this.formBtnOid = this.selectList[0].id; |
| | | this.getTabBtnTree(); |
| | |
| | | |
| | | // 按钮设计信息参数信息修改 |
| | | paramsRowEditHandler(row) { |
| | | this.$refs.paramsCrud.rowEdit(row); |
| | | this.$refs.paramsCrud.rowEdit(row, row.$index); |
| | | }, |
| | | |
| | | // 按钮设计参数信息添加按钮 |
| | |
| | | ...this.basicForm, |
| | | parentId: this.nodeTreeRow.oId === 'parentNode' ? '' : this.nodeTreeRow.parentId, |
| | | buttonParams: bottomParams, |
| | | tableOId:this.selectList[0].id |
| | | tableOId: this.selectList[0].id |
| | | } : { |
| | | ...this.basicForm, |
| | | buttonParams: bottomParams |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTabButton(this.nodeTreeRow).then(res => { |
| | | // console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success('删除成功'); |
| | | this.getTabBtnTree(); |
| | |
| | | |
| | | // 打开克隆对话框 |
| | | rowCloneHandler(row) { |
| | | console.log(row); |
| | | this.fromOid = this.sourceData.plOId; |
| | | this.sourceOId = row.id; |
| | | this.$refs.cloneDialog.openDialog(row); |
| | |
| | | return; |
| | | } |
| | | joinBtn(this.nodeTreeRow).then(res => { |
| | | // console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTabBtnTree(); |
| | |
| | | this.$message.error('请选择节点进行修改'); |
| | | return; |
| | | } |
| | | |
| | | if (this.nodeTreeRow.oId === "parentNode") { |
| | | this.$message.error('顶层节点不允许调整'); |
| | | return; |