已修改20个文件
已重命名2个文件
已添加2个文件
| | |
| | | } |
| | | |
| | | //主é®è·åå类模æ¿å±æ§ |
| | | export const gridCodeClassifyTemplateAttr = (oid) =>{ |
| | | export const gridCodeClassifyTemplate = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTempAttrController/gridCodeClassifyTemplateAttr', |
| | | url:'/api/ubcs-code/codeClassifyTemplateController/gridCodeClassifyTemplate', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //åºæ¬ä¿¡æ¯è¡¨åæ°æ® |
| | | export const getObjectByOid = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/getObjectByOid', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | //模æ¿å±æ§è¡¨æ ¼æ°æ® |
| | | export const gridCodeClassifyTemplateAttr = (params) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTempAttrController/gridCodeClassifyTemplateAttr', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | <basic-container> |
| | | <avue-tabs :option="Taboption" @change="handleChange"></avue-tabs> |
| | | <span v-if="type.prop==='tab1'"> |
| | | <avue-crud :data="data" :option="option"></avue-crud> |
| | | <attrCrud :ProData="ProData"></attrCrud> |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'">æ¨¡æ¿æµç¨</span> |
| | | <span v-else-if="type.prop==='tab3'">模æ¿é¶æ®µ</span> |
| | |
| | | <script> |
| | | export default { |
| | | name: "TemplatePro.vue", |
| | | props: ['ProData'], |
| | | data: function () { |
| | | return { |
| | | type: {}, |
| | |
| | | prop: 'tab4', |
| | | }] |
| | | }, |
| | | data:[ |
| | | { |
| | | EnglishNum:"æµè¯ä¸", |
| | | ChinaName:"æµè¯ä¸", |
| | | PropGruop:"æµè¯ä¸", |
| | | Type:"æµè¯ä¸" |
| | | }, |
| | | { |
| | | EnglishNum:"æµè¯äº", |
| | | ChinaName:"æµè¯äº", |
| | | PropGruop:"æµè¯äº", |
| | | Type:"æµè¯äº" |
| | | }, |
| | | { |
| | | EnglishNum:"æµè¯ä¸", |
| | | ChinaName:"æµè¯ä¸", |
| | | PropGruop:"æµè¯ä¸", |
| | | Type:"æµè¯ä¸" |
| | | } |
| | | ], |
| | | option: { |
| | | index: true, |
| | | border: true, |
| | | editBtn:false, |
| | | labelWidth:110, |
| | | column: [ |
| | | { |
| | | label: "屿§è±æç¼å·", |
| | | prop: "EnglishNum", |
| | | fixed:true, |
| | | labelWidth:110, |
| | | width:95 |
| | | }, |
| | | { |
| | | label: "屿§ä¸æåç§°", |
| | | prop: "ChinaName", |
| | | fixed:true, |
| | | width:95 |
| | | }, |
| | | { |
| | | label: "屿§åç»", |
| | | prop: "PropGruop" |
| | | }, |
| | | { |
| | | label: "ç±»å", |
| | | prop: "Type" |
| | | }, |
| | | { |
| | | label: "å表宽度", |
| | | prop: "ListWidth" |
| | | }, |
| | | { |
| | | label: "å
³é®å±æ§", |
| | | prop: "KeyAttr" |
| | | }, |
| | | { |
| | | label: "æ¥è¯¢å±æ§", |
| | | prop: "QueryPro" |
| | | }, |
| | | { |
| | | label: "é«çº§æ¥è¯¢å±æ§", |
| | | prop: "SeniorQueryPro", |
| | | width:95 |
| | | }, |
| | | { |
| | | label: "ç¸ä¼¼æ¥è¯¢å±æ§", |
| | | prop: "SimilarPro", |
| | | width:95 |
| | | }, |
| | | { |
| | | label: "å¿
è¾", |
| | | prop: "MustLose" |
| | | }, |
| | | { |
| | | label: "è¡¨åæ¾ç¤º", |
| | | prop: "FormDIs" |
| | | }, |
| | | { |
| | | label: "å表æ¾ç¤º", |
| | | prop: "TableDis" |
| | | }, |
| | | { |
| | | label: "åªè¯»", |
| | | prop: "readOnly" |
| | | }, |
| | | { |
| | | label: "å表æåº", |
| | | prop: "ListSort" |
| | | }, |
| | | |
| | | { |
| | | label: "å¤è¡ææ¬", |
| | | prop:"LineText", |
| | | }, |
| | | { |
| | | label: "é»è®¤å¼", |
| | | prop:"DefaultValue", |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop:"prefix", |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop:"suffix" |
| | | }, |
| | | { |
| | | label: "ç»åè§å", |
| | | prop:"ComRules" |
| | | }, |
| | | { |
| | | label: "éªè¯è§å", |
| | | prop:"rules" |
| | | }, |
| | | { |
| | | label: "æ¶é´æ ¼å¼", |
| | | prop:"TimeForm" |
| | | }, |
| | | { |
| | | label: "å类注å
¥", |
| | | prop:"claInjection" |
| | | }, |
| | | { |
| | | label: "å类注å
¥", |
| | | prop:"EnuInjection" |
| | | }, |
| | | { |
| | | label: "级è屿§", |
| | | prop:"CasProp" |
| | | }, |
| | | { |
| | | label: "åç
§é
ç½®", |
| | | prop:"RefConfig" |
| | | }, |
| | | { |
| | | label: "çº§èæ¥è¯¢å±æ§", |
| | | prop:"CasQueryProp" |
| | | }, |
| | | { |
| | | label: "éæ©åºæ è¯", |
| | | prop:"SelectLib" |
| | | }, |
| | | { |
| | | label: "å¡«åæç¤º", |
| | | prop:"FillPrompt" |
| | | }, |
| | | { |
| | | label: "è¡¨åæ¾ç¤ºæ ·å¼", |
| | | prop:"FormShow" |
| | | }, |
| | | { |
| | | label: "表åè¶
龿¥", |
| | | prop:"FormHer" |
| | | }, |
| | | { |
| | | label: "è¡¨æ ¼æ¾ç¤ºjs", |
| | | prop:"CrudJs" |
| | | }, |
| | | { |
| | | label: "é¿åº¦", |
| | | prop:"length" |
| | | }, |
| | | { |
| | | label: "å°æ°ç²¾åº¦", |
| | | prop:"DecimalPrecis" |
| | | }, |
| | | { |
| | | label: "åå¼èå´", |
| | | prop:"ValueRange" |
| | | }, |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | // è¿å
¥é¡µé¢é»è®¤æ¯æ¨¡æ¿å±æ§ |
| | | this.type = this.Taboption.column[0]; |
| | | this.type.prop="tab1" |
| | | this.type.prop = "tab1" |
| | | }, |
| | | methods: { |
| | | // Tabæ 忢 |
| | | handleChange(column) { |
| | | this.type = column |
| | | this.$message.success(JSON.stringify(column)) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | <!--<template>--> |
| | | <!-- <!– ä½¿ç¨ Element UI çè¡¨æ ¼ç»ä»¶å±ç¤ºæ°æ® –>--> |
| | | <!-- <!– 对æ¯è¡æ°æ®æ¸²æä¸ä¸ªè¡¨æ ¼è¡ç»ä»¶ –>--> |
| | | <!-- <el-table :data="data">--> |
| | | <!-- <el-table-column v-for="column in columns" :key="column.prop" :label="column.label">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <template v-if="isEditing(scope.$index, column.prop)">--> |
| | | <!-- <!– 使ç¨èªå®ä¹è¾å
¥æ¡ï¼ç»å®æ°æ®å¹¶çå¬ blur äºä»¶ –>--> |
| | | <!-- <el-input v-model="editorModel[scope.$index][column.prop]" ref="editor"--> |
| | | <!-- @blur="onEditorBlur(scope.$index, column.prop)">--> |
| | | <!-- </el-input>--> |
| | | <!-- </template>--> |
| | | <!-- <template v-else>--> |
| | | <!-- <!– å°æ°æ®æ¸²æä¸ºè¡¨æ ¼åå
æ ¼ï¼ç»å® click äºä»¶ –>--> |
| | | <!-- <div @click="onCellClick(scope.$index, column.prop)"--> |
| | | <!-- :style="{cursor: 'pointer', backgroundColor: isEditing(scope.$index, column.prop) ? '#F0F0F0' : 'transparent'}">--> |
| | | <!-- {{ scope.row[column.prop] === "" ? '' : scope.row[column.prop] }}--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- </el-table>--> |
| | | <!--</template>--> |
| | | |
| | | <!--<script>--> |
| | | <!--export default {--> |
| | | <!-- data() {--> |
| | | <!-- // ç»ä»¶çæ°æ®ï¼å
æ¬è¡¨æ ¼çæ°æ®ãåå®ä¹åå½åæ£å¨ç¼è¾çè¡åå--> |
| | | <!-- return {--> |
| | | <!-- data: [--> |
| | | <!-- { id: 1, name: 'å¼ ä¸', age: 18, attributegroup: 'ç·', attributeDataTypeText: '广ä¸çæ·±å³å¸' },--> |
| | | <!-- { id: 2, name: 'æå', age: 20, attributegroup: '女', attributeDataTypeText: 'åäº¬å¸æµ·æ·åº' },--> |
| | | <!-- { id: 3, name: 'çäº', age: 22, attributegroup: 'ç·', attributeDataTypeText: '䏿µ·å¸æµ¦ä¸æ°åº' },--> |
| | | <!-- { id: 4, name: 'èµµå
', age: 24, attributegroup: '女', attributeDataTypeText: '广ä¸ç广å·å¸' }--> |
| | | <!-- ],--> |
| | | <!-- columns: [ // å®ä¹è¡¨æ ¼çå--> |
| | | <!-- {--> |
| | | <!-- label: "屿§è±æç¼å·",--> |
| | | <!-- prop: "id",--> |
| | | <!-- fixed: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- labelWidth: 110,--> |
| | | <!-- width: 125,--> |
| | | <!-- sortable: true,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "屿§ä¸æåç§°",--> |
| | | <!-- prop: "name",--> |
| | | <!-- fixed: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- width: 125,--> |
| | | <!-- sortable: true--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "屿§åç»",--> |
| | | <!-- prop: "attributegroup",--> |
| | | <!-- cell: false,--> |
| | | <!-- sortable: true,--> |
| | | <!-- width: 125,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "ç±»å",--> |
| | | <!-- prop: "attributeDataTypeText",--> |
| | | <!-- cell: false,--> |
| | | <!-- sortable: true,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å表宽度",--> |
| | | <!-- prop: "attrTableWidth",--> |
| | | <!-- cell: false,--> |
| | | <!-- sortable: true,--> |
| | | <!-- width: 105,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å
³é®å±æ§",--> |
| | | <!-- prop: "keyattrflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "æ¥è¯¢å±æ§",--> |
| | | <!-- prop: "queryattrflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "é«çº§æ¥è¯¢å±æ§",--> |
| | | <!-- prop: "seniorqueryattrflag",--> |
| | | <!-- width: 95,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "ç¸ä¼¼æ¥è¯¢å±æ§",--> |
| | | <!-- prop: "samerepeatattrflag",--> |
| | | <!-- width: 95,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å¿
è¾",--> |
| | | <!-- prop: "requireflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "è¡¨åæ¾ç¤º",--> |
| | | <!-- prop: "formdisplayflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å表æ¾ç¤º",--> |
| | | <!-- prop: "tabledisplayflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "åªè¯»",--> |
| | | <!-- prop: "readonlyflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å表æåº",--> |
| | | <!-- prop: "sortattrflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | |
| | | <!-- {--> |
| | | <!-- label: "å¤è¡ææ¬",--> |
| | | <!-- prop: "textareaflag",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "é»è®¤å¼",--> |
| | | <!-- prop: "defaultvalue",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- width: 95,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "åç¼",--> |
| | | <!-- prop: "prefixvalue",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "åç¼",--> |
| | | <!-- prop: "suffixvalue",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "ç»åè§å",--> |
| | | <!-- prop: "componentrule",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- width: 105,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "éªè¯è§å",--> |
| | | <!-- prop: "verifyrule",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- width: 105,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "æ¶é´æ ¼å¼",--> |
| | | <!-- prop: "codedateformat",--> |
| | | <!-- sortable: true,--> |
| | | <!-- width: 105,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å类注å
¥",--> |
| | | <!-- prop: "classifyinvokelevel",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "æä¸¾æ³¨å
¥",--> |
| | | <!-- prop: "enumString",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "级è屿§",--> |
| | | <!-- prop: "parentCode",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "åç
§é
ç½®",--> |
| | | <!-- prop: "referConfig",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "çº§èæ¥è¯¢å±æ§",--> |
| | | <!-- prop: "parentQueryAttr",--> |
| | | <!-- width: 105,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "éæ©åºæ è¯",--> |
| | | <!-- prop: "libraryIdentification",--> |
| | | <!-- width: 105,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å¡«åæç¤º",--> |
| | | <!-- prop: "explain",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "è¡¨åæ¾ç¤ºæ ·å¼",--> |
| | | <!-- prop: "formdisplaystyle",--> |
| | | <!-- width: 105,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "è¡¨æ ¼æ¾ç¤ºæ ·å¼",--> |
| | | <!-- prop: "tabledisplaystyle",--> |
| | | <!-- width: 105,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "表åè¶
龿¥",--> |
| | | <!-- prop: "formhref",--> |
| | | <!-- width: 95,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "è¡¨æ ¼è¶
龿¥",--> |
| | | <!-- prop: "tablehref",--> |
| | | <!-- width: 95,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "è¡¨æ ¼æ¾ç¤ºjs",--> |
| | | <!-- prop: "tabledisplayjs",--> |
| | | <!-- width: 95,--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "é¿åº¦",--> |
| | | <!-- prop: "controllength",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "å°æ°ç²¾åº¦",--> |
| | | <!-- prop: "precisionlength",--> |
| | | <!-- cell: false,--> |
| | | <!-- },--> |
| | | <!-- {--> |
| | | <!-- label: "åå¼èå´",--> |
| | | <!-- prop: "valuearea",--> |
| | | <!-- sortable: true,--> |
| | | <!-- cell: false,--> |
| | | <!-- width: 105,--> |
| | | <!-- },--> |
| | | |
| | | <!-- ],--> |
| | | <!-- editingIndex: -1, // å½åæ£å¨ç¼è¾çè¡çç´¢å¼--> |
| | | <!-- editingColumn: '', // å½åæ£å¨ç¼è¾çåç屿§å--> |
| | | <!-- editorModel: [] // ç¼è¾æ¡çæ°æ®ï¼ä½¿ç¨æ°ç»ä¿åæ¯ä¸ªåå
æ ¼çæ°æ®--> |
| | | <!-- };--> |
| | | <!-- },--> |
| | | <!-- created() {--> |
| | | <!-- // å¨ç»ä»¶å建æ¶ï¼åå§åç¼è¾æ¡çæ°æ®--> |
| | | <!-- this.editorModel = this.data.map(row => {--> |
| | | <!-- const editorRow = {};--> |
| | | <!-- this.columns.forEach(column => {--> |
| | | <!-- editorRow[column.prop] = row[column.prop];--> |
| | | <!-- });--> |
| | | <!-- return editorRow;--> |
| | | <!-- });--> |
| | | <!-- },--> |
| | | <!-- methods: {--> |
| | | <!-- // åå
æ ¼ç¹å»äºä»¶å¤ç彿°--> |
| | | <!-- onCellClick(rowIndex, columnProp) {--> |
| | | <!-- if (this.editingIndex >= 0 && this.editingColumn) {--> |
| | | <!-- this.onEditorBlur(this.editingIndex, this.editingColumn);--> |
| | | <!-- return;--> |
| | | <!-- }--> |
| | | |
| | | <!-- const cellValue = this.data[rowIndex][columnProp];--> |
| | | <!-- if (cellValue === undefined || cellValue === null) {--> |
| | | <!-- this.data[rowIndex][columnProp] = '';--> |
| | | <!-- }--> |
| | | |
| | | <!-- this.editingIndex = rowIndex;--> |
| | | <!-- this.editingColumn = columnProp;--> |
| | | |
| | | <!-- this.$nextTick(() => {--> |
| | | <!-- this.$refs.editor.focus();--> |
| | | <!-- });--> |
| | | <!-- },--> |
| | | |
| | | <!-- // ç¼è¾æ¡å¤±ç¦äºä»¶å¤ç彿°--> |
| | | <!-- onEditorBlur(rowIndex, columnProp) {--> |
| | | <!-- // å°å½åç¼è¾æ¡çæ°æ®ä¿åå°è¡¨æ ¼æ°æ®ä¸--> |
| | | <!-- const editorValue = this.editorModel[rowIndex][columnProp];--> |
| | | <!-- if (editorValue === '') {--> |
| | | <!-- this.data[rowIndex][columnProp] = undefined;--> |
| | | <!-- } else {--> |
| | | <!-- this.data[rowIndex][columnProp] = editorValue;--> |
| | | <!-- }--> |
| | | |
| | | <!-- this.editingIndex = -1;--> |
| | | <!-- this.editingColumn = '';--> |
| | | <!-- },--> |
| | | <!-- // 夿æå®åå
æ ¼æ¯å¦å¨ç¼è¾ç¶æ--> |
| | | <!-- isEditing(rowIndex, columnProp) {--> |
| | | <!-- return rowIndex === this.editingIndex && columnProp === this.editingColumn;--> |
| | | <!-- }--> |
| | | <!-- }--> |
| | | <!--};--> |
| | | <!--</script>--> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | //ä¿®æ¹å类注å
¥å¯¹è¯æ¡å
Œ
±æ ·å¼ |
| | | .mydialog .el-dialog__body { |
| | | padding: 10px 20px 30px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <avue-crud :data="data" :option="option" @sort-change="sortChange" @row-update="addUpdate" |
| | | <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate" |
| | | @cell-click="handleRowClick"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="addVisible=true">ï¼ æ·»å </el-button> |
| | | <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="addVisible=true">ï¼ æ·»å {{msg}}</el-button> |
| | | <el-dialog :visible.sync="addVisible" append-to-body title="ä»ä¸å¡ç±»åä¸éæ©å±æ§"> |
| | | <avue-crud :data="businessData" :option="businessOption"></avue-crud> |
| | | </el-dialog> |
| | |
| | | <script> |
| | | export default { |
| | | name: "attrCrud .vue", |
| | | props: ['ProData'], |
| | | data() { |
| | | return { |
| | | |
| | | CascadeVisible: false, |
| | | attrEditVisible: false, |
| | | // 级èåé |
| | |
| | | }, |
| | | mounted() { |
| | | console.log(this.attrEditVisible) |
| | | console.log(this.ProData) |
| | | }, |
| | | methods: { |
| | | addsHandler(){ |
| | |
| | | }, |
| | | // screenEdit(){ |
| | | // debugger |
| | | |
| | | // this.attrEditVisible=true; |
| | | // }, |
| | | // outEdit(){ |
| | |
| | | <template> |
| | | <avue-form v-model="TreeNewForm" :option="option" @submit="submit"> |
| | | |
| | | </avue-form> |
| | | |
| | | </template> |
| | |
| | | option: { |
| | | column: [ |
| | | { |
| | | label: 'å§å', |
| | | label: '主é¢åº/åç±»ç¼å·', |
| | | prop: 'btmtypeid', |
| | | labelWidth:128, |
| | | readonly: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "主é¢åº/åç±»ç¼å·", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: '主é¢åº/åç±»åç§°', |
| | | prop: 'name', |
| | | readonly: true, |
| | | labelWidth:128, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥å§å", |
| | | message: "主é¢åº/åç±»åç§°", |
| | | trigger: "blur" |
| | | }] |
| | | }, { |
| | | label: 'æ§å«', |
| | | prop: 'sex', |
| | | }, |
| | | { |
| | | label:"æè¿°", |
| | | prop:"description" |
| | | }, |
| | | { |
| | | label: 'åå¨çä¸å¡ç±»å', |
| | | prop: 'btmtypename', |
| | | labelWidth:128, |
| | | readonly: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥æ§å«", |
| | | message: "åå¨çä¸å¡ç±»å", |
| | | trigger: "blur" |
| | | }] |
| | | } |
| | | }, |
| | | { |
| | | label:"ç¼ç è§å", |
| | | prop:"coderuleoidName" |
| | | }, |
| | | { |
| | | label:"忽ç¥å¤§å°åæ¥é", |
| | | prop:"codekeyattrrepeatoidName", |
| | | labelWidth:128, |
| | | }, |
| | | { |
| | | label:"ç¸ä¼¼æ¥è¯¢è§å", |
| | | prop:"codeResembleRuleOidName", |
| | | labelWidth:100, |
| | | }, |
| | | ] |
| | | }, |
| | | FormList: {} |
| | |
| | | <template> |
| | | <el-container> |
| | | <!-- 左侧èå--> |
| | | <el-aside > |
| | | <basic-container> |
| | | <avue-tree ref="tree" v-model="form" :data="Treedata" :option="Treeoption" @node-click=" nodeClick" |
| | | @del="rowDel" @save="rowSave" @check-change="checkChange" style="height: 754px" > |
| | | <!-- 左侧èå--> |
| | | <el-aside> |
| | | <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"> |
| | | <div> |
| | | <div style="display: flex;justify-content: space-around"> |
| | | <el-button plain size="small" type="primary" @click="TreeAdd">æ·»å </el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit">ä¿®æ¹</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">å é¤</el-button> |
| | | <el-button plain size="small" type="primary" @click="Enable">å¯ç¨</el-button> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> |
| | | <el-button plain size="small" type="primary" @click="Deactivate">åç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel">导åº</el-button> |
| | | <el-button plain size="small" type="primary" @click="ImportExcel">导å
¥</el-button> |
| | | <el-button plain size="small" type="primary" @click="flushed">å·æ°</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- æ èç¹æ·»å å¯¹è¯æ¡--> |
| | | <el-dialog :title="this.TreeFlag ? 'æ·»å åç±»' :'æ·»å 主é¢åº'" :visible.sync="TreeAddFormVisible" append-to-body |
| | | style="width: 1700px;margin: auto"> |
| | | <el-form :model="TreeAddform"> |
| | | <el-form-item :label="this.TreeFlag ? 'åç±»ç¼å·ï¼' :'主é¢åºç¼å·ï¼'" label-width="150px" style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="this.TreeFlag ? 'åç±»åç§°ï¼' :'主é¢åºåç§°ï¼'" label-width="100px" style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°ï¼" label-width="150px"> |
| | | <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-show="this.TreeFlag==false" label="åå¨çä¸å¡ç±»åï¼" label-width="150px"> |
| | | <el-input v-model="TreeAddform.btmtypename" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¼ç è§åï¼" label-width="150px"> |
| | | <el-input v-model="TreeAddform.coderuleoidName" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å
³é®å±æ§æ¥è¯¢è§åï¼" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codekeyattrrepeatoidName" autocomplete="off" |
| | | style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¸ä¼¼æ¥è¯¢è§åï¼" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" |
| | | style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="TreeAddFormVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="TreeAddHandler">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- ä¿®æ¹å¯¹è¯æ¡--> |
| | | <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="ä¿®æ¹åç±»"> |
| | | <classifyTreeform ref="childForm" :TreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform> |
| | | </el-dialog> |
| | | <avue-tree ref="tree" v-model="TreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px" |
| | | @node-click=" nodeClick" |
| | | @check-change="checkChange" |
| | | > |
| | | </avue-tree> |
| | | |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <!-- å³ä¾§è¡¨æ ¼--> |
| | | <basic-container style="height: 85vh; max-height: 155vh; "> |
| | | <!-- å³ä¾§è¡¨æ ¼--> |
| | | <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs> |
| | | <span v-if="type.prop==='tab1'"> |
| | | <avue-crud v-model="crudForm" :data="this.Formlist" :option="this.crudTreeOption" style="height: 700px"></avue-crud> |
| | | <basic-container> |
| | | <avue-crud v-model="crudForm" :data="this.Formlist" :option="this.crudTreeOption" v-loading="FormLoing" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button plain size="small" type="primary">æ¥è¯¢</el-button> |
| | | <el-button plain size="small" type="primary" @click="TemRefresh">å·æ°</el-button> |
| | | <el-button plain size="small" type="primary">ä»å
¶å®æ¨¡æ¿å
é</el-button> |
| | | <div style="display: inline-block"> <el-input v-model="FindText" placeholder="请è¾å
¥å
³é®åæå车æ¥è¯¢" |
| | | size="small" |
| | | @keyup.enter.native="EnterFind"></el-input></div> |
| | | |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <templatePro :ProData="this.ProData"></templatePro> |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | | <!-- 妿æ¯è¡¨æ ¼å 表å就忬¡å¼å
¥è¿ä¸ªclassifyTreeformç»ä»¶ï¼é颿¯è¡¨åçå
å®¹ï¼æ²¡ç¨å°±å 餿ãæä¸é¢tabæ ä¹å é¤äº--> |
| | | <classifyTreeform ref="childForm" :nodeList="nodeList" :TreeNewForm="TreeList"></classifyTreeform> |
| | | <template-pro></template-pro> |
| | | <classifyTreeform ref="childForm" :TreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform> |
| | | </span> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | //è¿é声æä¸äºèåç»ä»¶ç¨æ³ï¼é¦å
å¸å±å为左侧èåå³ä¾§è¡¨æ ¼ï¼å¯è½ä¼æå³ä¾§Tabæ å 表åçæ
åµãæä»¥å¦å¤å¼å
¥äºä¸ä¸ªå³ä¾§è¡¨åçç»ä»¶"classifyTreeform"ã |
| | | //é¦å
ç¶ç»ä»¶è°ç¨åç»ä»¶èåï¼éè¿provideä¼ éåæ°ãæTreeoptionå·¦ä¾§æ æ°å¢è¡¨å项 Treedata左侧æ èç¹é
置项 crudTreeOptionå³ä¾§è¡¨æ ¼é
置项 crudTreeDataå³ä¾§è¡¨æ ¼æ¾ç¤ºå
容 |
| | | //å
¶ä¸è¡¨æ ¼çé
ç½®é¡¹ç´æ¥ç¶ä¼ åä¼ éè¿æ¥å°±è¡ï¼ç´æ¥:option=ä¼ éçåæ°åï¼é颿°æ®æ¾ç¤ºçå
容å 为æ¯å左侧èå¨çï¼æä»¥éæ°ä¸ä¸ªFormlistï¼éè¿ç¹å»æ èç¹ä¸æ æ¥å¨ææ¸²æå³ä¾§è¡¨æ ¼ï¼ä¸é¢æ¹æ³é½æå
·ä½æ³¨é |
| | | //ç¶åå说å³ä¾§ç表åï¼ä¸é¨å®ä¹äºä¸ä¸ªç»ä»¶ï¼éè¿ç¶ä¼ ååæè¡¨åæ°æ®TreeListä¼ éè¿å»ï¼ä¼ éåå¨10deCLi1ckæ¹æ³éé¢ä¾¿äºå¤ç乿¯ä¸ä¸ªèå¨çææï¼è¡¨åçé
置项å¨åªä¸ªåç»ä»¶æè
ç¶ç»ä»¶åé½å¯ä»¥ã |
| | | import { |
| | | getAtrrList, |
| | | TreeSave, |
| | | TreeDel, |
| | | TreeCheckDel, |
| | | TreeObjcet, |
| | | TreeEnable, |
| | | TreeDeactivate, |
| | | importClassify, |
| | | gridCodeClassifyTemplate, |
| | | getObjectByOid, |
| | | gridCodeClassifyTemplateAttr |
| | | } from "@/api/template/templateAttr"; |
| | | |
| | | export default { |
| | | name: "classifyTrees.vue", |
| | | //使ç¨injectæ¥æ¶åæ° |
| | | //Treeoptionå·¦ä¾§æ æ°å¢è¡¨å项 Treedata左侧æ èç¹é
置项 crudTreeOptionå³ä¾§è¡¨æ ¼é
置项 crudTreeDataå³ä¾§è¡¨æ ¼æ¾ç¤ºå
容 |
| | | //Treeoptionå·¦ä¾§æ æ°å¢è¡¨å项 Treedata左侧æ èç¹ é
置项 crudTreeOptionå³ä¾§è¡¨æ ¼é
置项 crudTreeDataå³ä¾§è¡¨æ ¼æ¾ç¤ºå
容 |
| | | //Treeformå³ä¾§è¡¨åé
置项 |
| | | inject: ['crudTreeOption',"crudTreeData", "Treedata", "Treeoption"], |
| | | inject: ['crudTreeOption', "crudTreeData"], |
| | | data() { |
| | | return { |
| | | ProData: [], |
| | | FindText: "", |
| | | fileList: [], |
| | | FlagObj: {}, |
| | | //ä¿®æ¹å¯¹è¯æ¡ |
| | | TreeEditFormVisible: false, |
| | | //æ·»å å¯¹è¯æ¡ |
| | | TreeAddFormVisible: false, |
| | | //å½åç¹å»é¡¹ |
| | | nodeClickList: "", |
| | | //åç±»å主é¢åºç¶æ |
| | | TreeFlag: false, |
| | | //æ å è½½ |
| | | loading: false, |
| | | FormLoing:false, |
| | | TreeAddform: { |
| | | id: "", |
| | | name: "", |
| | | description: "", |
| | | //ç¸ä¼¼æ¥è¯¢è§å |
| | | codeResembleRuleOidName: "", |
| | | //å
³é®å±æ§æ¥è¯¢è§å |
| | | codekeyattrrepeatoidName: "", |
| | | //ç¼ç è§å |
| | | coderuleoidName: "", |
| | | //åå¨çä¸å¡ç±»å |
| | | btmtypename: "" |
| | | }, |
| | | //avue-treeæ°æ®ï¼ææ¶æ²¡æä½ç¨ï¼éé¢åè½ç¨elementåäºï¼åªç¨avueçä¸ä¸ªæ ç»ä»¶ä¸ç¨å
置表åäºã |
| | | TreeAvueform: {}, |
| | | Treedata: [], |
| | | Treeoption: { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | // //è¿ä¸ªæ¯å¤é |
| | | // multiple: true, |
| | | }, |
| | | crudForm: "", |
| | | form: {}, |
| | | //卿忢å¤çè¿çè¡¨æ ¼æ°æ® |
| | | Formlist: [], |
| | | //tabç¶æ |
| | |
| | | { |
| | | name: "æµè¯1", |
| | | sex: "ç·", |
| | | value:0 |
| | | value: 0 |
| | | }, |
| | | { |
| | | name: "æµè¯2", |
| | | sex: "女", |
| | | value:1 |
| | | value: 1 |
| | | } |
| | | ], |
| | | //ä¼ éç»åç»ä»¶å¨ææ¸²æçæ°æ® |
| | | TreeList:{} |
| | | TreeList: {}, |
| | | //å®ä¹ä¸ä¸ªæ¨¡æ¿å±æ§idï¼æ°æ®æ¯æ¨¡æ¿ç®¡çè¡¨æ ¼éé¢çoid |
| | | } |
| | | }, |
| | | //tabæ é»è®¤æ¯è¡¨æ ¼ |
| | | mounted() { |
| | | this.type = this.tabOption.column[0]; |
| | | this.getAttr(); |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | //ç¹å»å·¦ä¾§æ å³ä¾§å¨æçæ¹æ³ |
| | | this.Formlist = this.crudTreeData[data.value].column |
| | | this.nodeList=data.value |
| | | this.TreeList = this.Treeform.find(item => { |
| | | return item.value == data.value |
| | | }); |
| | | console.log(data) |
| | | //åç±»æ æ°æ®å¤ç |
| | | getAttr() { |
| | | getAtrrList().then(res => { |
| | | this.Treedata = res.data; |
| | | this.Treedata.forEach(() => { |
| | | for (let i = 0; i < this.Treedata.length; i++) { |
| | | this.Treedata[i].value = i; |
| | | } |
| | | }) |
| | | //è°ç¨ä¿®æ¹å±æ§åæ¹æ³ |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | //tabæ 忢 |
| | | handleChange(column) { |
| | | this.type = column |
| | | //å®ä¹ä¸ä¸ªä¿®æ¹å¯¹è±¡å±æ§åçæ¹æ³ |
| | | ModifyProperties(obj, oldName, newName) { |
| | | for (let key in obj) { |
| | | if (key === oldName) { |
| | | obj[newName] = obj[key]; |
| | | delete obj[key]; |
| | | } |
| | | if (typeof obj[key] === 'object') { |
| | | this.ModifyProperties(obj[key], oldName, newName); |
| | | } |
| | | } |
| | | }, |
| | | // å·¦æ å¤é |
| | | checkChange(val) { |
| | | console.log(val) |
| | | //æ èç¹æ·»å æé® |
| | | TreeAdd() { |
| | | this.TreeAddFormVisible = true; |
| | | // 夿å½åæ¯å¦æç¹å»å项 |
| | | if (this.nodeClickList !== "") { |
| | | this.TreeFlag = true |
| | | } |
| | | }, |
| | | //å é¤ |
| | | rowDel(row, index, done) { |
| | | console.log(row) |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | //æ èç¹æ·»å äºä»¶ |
| | | TreeAddHandler() { |
| | | const data = this.TreeAddform |
| | | this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid) |
| | | TreeSave(data).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå!' |
| | | }); |
| | | this.getAttr(); |
| | | this.TreeAddFormVisible = false |
| | | this.TreeAddform = "" |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | }, |
| | | //æ èç¹å é¤æé® |
| | | TreeDel() { |
| | | this.$confirm('æ¯å¦å é¤å½åéæ©çåç±»ï¼å°ä¼æååç±»ä¸å¹¶å é¤ï¼å¦æåå¨ç¼ç æ°æ®å°ä¸è½è¢«å é¤ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | customClass: 'my-messagebox', |
| | | }).then(() => { |
| | | this.$message.success('å 餿å') |
| | | done(); |
| | | TreeCheckDel(this.nodeClickList).then(res => { |
| | | if (res.data.data) { |
| | | TreeDel(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getAttr(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | } else { |
| | | this.$confirm('å½åæ°æ®å
嫿ä¸çº§æ°æ®ï¼è¦å é¤çè¯ä¼åä¸çº§æ°æ®ä¸èµ·å é¤ï¼ä½ 确认继ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | customClass: 'my-messageboxs', |
| | | }).then(() => { |
| | | TreeDel(this.nodeClickList).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getAttr(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res |
| | | }); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | //æ·»å |
| | | rowSave(node,data,done,loading) { |
| | | this.$message.success('æ°å¢åè°') |
| | | // this.form.id = new Date().getTime(); |
| | | // this.form.value=new Date().getTime(); |
| | | // this.form.children=[]; |
| | | console.log(this.form) |
| | | // console.log("Type",node,data,done,loading) |
| | | // console.log(node,"node") |
| | | // console.log("data",data) |
| | | // console.log("done",done) |
| | | // console.log("loading",loading) |
| | | done(); |
| | | //ä¿®æ¹åå¡« |
| | | TreeEdit() { |
| | | if (this.nodeClickList == "") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请å
仿 ä¸éæ©ä¸æ¡æ°æ®!' |
| | | }); |
| | | } else { |
| | | this.TreeEditFormVisible = true |
| | | } |
| | | }, |
| | | |
| | | //æ å·æ° |
| | | flushed() { |
| | | this.loading = true |
| | | this.getAttr() |
| | | setTimeout(() => { |
| | | this.loading = false; |
| | | this.nodeClickList = "" |
| | | }, 600); |
| | | }, |
| | | //å¯ç¨ååç¨é½å
å¤æç¶æ |
| | | //å¯ç¨ |
| | | Enable() { |
| | | if (this.FlagObj.lcStatus == "Enabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯åç¨ç¶æ' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦å°ååç±»ä¸å¹¶å¯ç¨ï¼', 'æç¤º', { |
| | | confirmButtonText: 'æ¯', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeEnable(this.nodeClickList).then((res) => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å¯ç¨æå!' |
| | | }); |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å¯ç¨' |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | //åç¨ |
| | | Deactivate() { |
| | | if (this.FlagObj.lcStatus === "Disabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯å¯ç¨ç¶æ!' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦åç¨å½ååç±»ï¼åç¨åï¼ååç±»ä¹å°ä¸è½è¢«ä½¿ç¨ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeDeactivate(this.nodeClickList).then((res) => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'åç¨æå!' |
| | | }); |
| | | this.nodeClickList['flag'] = true; |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶åç¨' |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | async nodeClick(data) { |
| | | //å®ä¹ä¸ä¸ªæ¨¡æ¿å±æ§idï¼æ°æ®æ¯æ¨¡æ¿ç®¡çè¡¨æ ¼éé¢çoid |
| | | this.nodeClickList = data |
| | | console.log(data.oid) |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | | this.FlagObj = res.data.data |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | //模æ¿ç®¡çè¡¨æ ¼æ°æ® |
| | | await gridCodeClassifyTemplate(data.oid).then(res => { |
| | | this.Formlist = res.data.data.filter(item => { |
| | | if(item.codeclassifyoid != ""){ |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | }) |
| | | console.log("formlist", this.Formlist) |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | this.ProData = res.data.data |
| | | console.log(this.ProData) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }).catch(res => { |
| | | console.log(res) |
| | | }) |
| | | // åºæ¬ä¿¡æ¯è¡¨åæ°æ® |
| | | await getObjectByOid(this.nodeClickList.oid).then(res => { |
| | | this.TreeList = res.data.data |
| | | // eslint-disable-next-line no-const-assig |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | }, |
| | | //tabæ 忢 |
| | | handleChange(column) { |
| | | this.type = column |
| | | }, |
| | | //模æ¿ç®¡çè¡¨æ ¼æ¥è¯¢ |
| | | EnterFind() { |
| | | console.log(this.Formlist) |
| | | if (this.FindText == "") { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data |
| | | }) |
| | | } else { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.name.includes(this.FindText) |
| | | } |
| | | ) |
| | | } |
| | | ) |
| | | } |
| | | }, |
| | | TemRefresh(){ |
| | | this.FormLoing=true |
| | | if(this.nodeClickList.oid != ""){ |
| | | gridCodeClassifyTemplate(this.nodeClickList.oid).then(res=>{ |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | }) |
| | | }) |
| | | }else { |
| | | this.FormLoing=true |
| | | } |
| | | setTimeout(() => { |
| | | this.FormLoing=false |
| | | }, 600); |
| | | }, |
| | | // å·¦æ å¤é |
| | | checkChange(val) { |
| | | console.log(val) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | .el-form { |
| | | display: flex; |
| | | flex-wrap: wrap; /* è®¾ç½®å¯æ¢è¡ï¼ä»¥ä¾¿å¨å°å±å¹è®¾å¤ä¸ä½¿ç¨å¤è¡å¸å± */ |
| | | } |
| | | |
| | | .el-form-item { |
| | | flex: 1; /* 设置å
ç´ å æ®1ä»½ç©ºé´ */ |
| | | margin-right: 1rem; /* 设置å
ç´ ä¹é´çé´è· */ |
| | | } |
| | | |
| | | .my-messagebox { |
| | | width: 700px; |
| | | } |
| | | |
| | | .my-messageboxs { |
| | | width: 500px; |
| | | } |
| | | </style> |
| | |
| | | <el-col :span="10"> |
| | | <el-card |
| | | class="box-card formula-box-card" |
| | | data-v-49729759 |
| | | style="height: 35vh;"> |
| | | <div slot="header" class="clearfix"> |
| | | <span style="font-size: medium">è¿ç®ç¬¦</span> |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style scoped> |
| | | |
| | | .formula-box-card > .el-card__body { |
| | | .formula-box-card >>> .el-card__body { |
| | | padding: 0px; |
| | | height: 85%; |
| | | width: 100%; |
| | |
| | | :visible.sync="isShowReferConfig" |
| | | width="90%" |
| | | @close="recoveryDataAndForm('initData')" |
| | | style="height: 110vh; margin-top: -13vh; overflow-y: hidden"> |
| | | <div style="width: 100%; overflow-y: auto; height: 70vh"> |
| | | <el-row> |
| | | <avue-form :option="formOption" v-model="form"></avue-form> |
| | | </el-row> |
| | | <el-row v-show="form.referWindowType==0 || form.referWindowType==3"> |
| | | <avue-crud |
| | | ref="crudAttr" |
| | | :option="attrOption" |
| | | :data="attrData"> |
| | | <!-- è¡¨æ ¼å
æä½æé® --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="scope.row.isquery=!scope.row.isquery"> |
| | | {{scope.row.isquery ? "å¿«éæ¥è¯¢":"åæ¶å¿«éæ¥è¯¢"}} |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-minus" |
| | | plain |
| | | @click="removeCurrentRow(scope.row,'removeAttr')">ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="openAddSearchOrAttrDialog('selectAttr')">鿩屿§ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-row> |
| | | <el-row> |
| | | <avue-crud |
| | | ref="crudAddCondition" |
| | | :option="addSearchCondtionOption" |
| | | :data="addSearchCondtionData"> |
| | | <!-- è¡¨æ ¼å
æä½æé® --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-minus" |
| | | plain |
| | | @click="removeCurrentRow(scope.row,'removeaddSearchCondtion')">ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="openAddSearchOrAttrDialog('addSearchCondition')"> |
| | | æ·»å æ¥è¯¢æ¡ä»¶ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-row> |
| | | </div> |
| | | style="height: 115vh; margin-top: -14vh; overflow-y: hidden"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="èªå®ä¹åç
§é
ç½®" name="first"> |
| | | <div style="width: 100%; overflow-y: auto; height: 65vh"> |
| | | <el-row> |
| | | <avue-form ref="form" :option="formOption" v-model="form" class="referTypeForm"> |
| | | <template> |
| | | <el-input |
| | | ref="referType" |
| | | placeholder="è¯·éæ© åç
§çä¸å¡ç±»å" |
| | | prefix-icon="el-icon-search" |
| | | readonly="true" |
| | | v-model="form.referType" |
| | | @focus="openAttrSelectOrGetValue('referType')"> |
| | | <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referType')" style="margin-right: 5px;cursor: pointer;"></i> |
| | | </el-input> |
| | | </template> |
| | | </avue-form> |
| | | </el-row> |
| | | <el-row v-show="form.type=='default' || form.type=='grid'"> |
| | | <avue-crud |
| | | ref="crudAttr" |
| | | :option="attrOption" |
| | | @cell-click="clicktest" |
| | | :data="attrData"> |
| | | <!-- è¡¨æ ¼å
æä½æé® --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="scope.row.isquery=!scope.row.isquery"> |
| | | {{scope.row.isquery ? "åæ¶å¿«éæ¥è¯¢":"å¿«éæ¥è¯¢"}} |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-minus" |
| | | plain |
| | | @click="removeCurrentRow(scope.row,'removeAttr')">ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="openAddSearchOrAttrDialog('selectAttr')">鿩屿§ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-row> |
| | | <el-row> |
| | | <avue-crud |
| | | ref="crudAddCondition" |
| | | :option="addSearchCondtionOption" |
| | | :data="addSearchCondtionData"> |
| | | <!-- è¡¨æ ¼å
æä½æé® --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-minus" |
| | | plain |
| | | @click="removeCurrentRow(scope.row,'removeaddSearchCondtion')">ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="openAddSearchOrAttrDialog('addSearchCondition')"> |
| | | æ·»å æ¥è¯¢æ¡ä»¶ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç´æ¥éååç
§é
ç½®" name="second"> |
| | | <div style="width: 100%; overflow-y: auto; height: 65vh"> |
| | | <avue-crud |
| | | :option="optionSelectReferConfig" |
| | | :table-loading="selectReferConfigLoading" |
| | | :data="selectReferConfigData" |
| | | :page.sync="selectReferConfigPage" |
| | | ref="selectReferConfigCrud" |
| | | @row-click="codeRuleRowClick" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="selectedListReferConfig">ç¡® å®</el-button> |
| | | <el-button @click="recoveryDataAndForm('initForm')">æ¸
空å
容</el-button> |
| | |
| | | props: { |
| | | //æ¬åºæ¯åé |
| | | thisSceneTableData: { |
| | | type: Array, |
| | | type: Array, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: 'first', //å½åæ´»å¨çtabs |
| | | labelWidth: '150', // æ é¢å®½åº¦ |
| | | isShowReferConfig: false, // å¯¹è¯æ¡æ¾ç¤ºéèæ§å¶ |
| | | // 表å对象 |
| | | form: { |
| | | text: '', |
| | | text1: '', |
| | | text2: '', |
| | | referWindowType: 0, //åç
§çªå£ç±»å |
| | | referType: '', |
| | | textField: 'name', |
| | | valueField: 'oid', |
| | | type: 'default', //åç
§çªå£ç±»å |
| | | url: '', |
| | | backPath: '', |
| | | method: 'GET', |
| | | height: '', |
| | | useFormKey: '', |
| | | paramForFormKey: '', |
| | | isMuti: false, |
| | | mapFields: '', |
| | | // limit: '15', |
| | | // sortField: '', |
| | | // sortType: 'asc', |
| | | // referContent: '', |
| | | // displayTable: '', |
| | | // parentFieldName: '', |
| | | // parentUsedField: 'oid', |
| | | // parentValue: '', |
| | | // loadType: 'all', |
| | | // onlyLeaf: false, |
| | | }, |
| | | attrData: [ |
| | | { |
| | |
| | | prop: "value", |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | optionSelectReferConfig: { |
| | | height:'auto', |
| | | tip: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | //searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | index: true, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | //selection: false, |
| | | //disablePage: false, |
| | | //refreshBtn: false, |
| | | //columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: "ååæ®µ(*)", |
| | | prop: "field", |
| | | },{ |
| | | label: "åå(*)", |
| | | prop: "title", |
| | | },{ |
| | | label: "åæ®µç±»å(*)", |
| | | prop: "fieldTypeText", |
| | | },{ |
| | | label: "åè¡¨å¯æåº", |
| | | prop: "sort", |
| | | },{ |
| | | label: "æåºå段", |
| | | prop: "sortField", |
| | | },{ |
| | | label: "åæ®µå®½åº¦", |
| | | prop: "width", |
| | | },{ |
| | | label: "ååºå®ä½ç½®", |
| | | prop: "fixedText", |
| | | },{ |
| | | label: "jsæ¾ç¤ºä»£ç ", |
| | | prop: "templet", |
| | | }, |
| | | ] |
| | | }, |
| | | selectReferConfigLoading: false, |
| | | selectReferConfigData: [ |
| | | { |
| | | field: 'id', |
| | | title: 'ç¼å·', |
| | | fieldType: 'text', |
| | | fieldTypeText: 'ææ¬æ¡', |
| | | sort: "true", |
| | | sortField: 'id', |
| | | width: '150', |
| | | isquery: true, |
| | | },{ |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | fieldType: 'text', |
| | | fieldTypeText: 'ææ¬æ¡', |
| | | sort: "true", |
| | | sortField: 'name', |
| | | width: '180', |
| | | isquery: true, |
| | | } |
| | | ], |
| | | selectReferConfigPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectReferConfigQuery: {}, |
| | | |
| | | }; |
| | | }, |
| | | // 表åç颿¾ç¤ºå
容é
ç½® |
| | | computed: { |
| | | formOption() { |
| | | /** æ£éªæ¯å¦ä¸ºæ°å */ |
| | | let validateNumber = ""; |
| | | validateNumber = (rule, value,callback) => { |
| | | if(/[^\d]/g.test(value)){ |
| | | callback(new Error('çªå£æ¾ç¤ºçé«åº¦å¿
须为æ°å¼ç±»å')); |
| | | }else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | |
| | | column: [ |
| | | { |
| | | label: 'åç
§çä¸å¡ç±»å', |
| | | prop: 'text1', |
| | | prop: 'referType', |
| | | span: 7, |
| | | type: 'table', |
| | | tip: 'åç
§æ°æ®æ¥è¯¢çä¸å¡ç±»åã', |
| | | tipPlacement: 'right', |
| | | type: 'input', |
| | | rules: [{ |
| | | required: true, |
| | | message: "(åç
§çä¸å¡ç±»å)å¿
填项ä¸è½ä¸ºç©º", |
| | | trigger: "blur", |
| | | }], |
| | | children: { |
| | | border: true, |
| | | height: '200px', |
| | | tip: false, |
| | | //searchShow: false, |
| | | index: true, |
| | | selection: true, |
| | | //refreshBtn: false, |
| | | //columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [{ |
| | | label: 'ä¸å¡ç±»åç¼å·', |
| | | width: 120, |
| | |
| | | prop: 'description' |
| | | }], |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "(åç
§çä¸å¡ç±»å)å¿
填项ä¸è½ä¸ºç©º", |
| | | trigger: "blur", |
| | | }], |
| | | // formatter: (row) => { |
| | | // console.log(row.name); |
| | | // if (!row.name) |
| | | // return '' |
| | | // return row.name; |
| | | // }, |
| | | // onLoad: ({ page, value, data }, callback) => { |
| | | // console.log(page); |
| | | // console.log(value); |
| | | // console.log(data); |
| | | // //馿¬¡å è½½å»æ¥è¯¢å¯¹åºçå¼ |
| | | // if (value) { |
| | | // console.log(111+"======="+ value); |
| | | // this.$message.success('馿¬¡æ¥è¯¢' + value) |
| | | // callback({ |
| | | // id: 't1', |
| | | // name: 'test1', |
| | | // description: 'test1', |
| | | // }) |
| | | // return; |
| | | // } |
| | | // if (data) { |
| | | // console.log(111+"======="+ data); |
| | | // this.$message.success('æç´¢æ¥è¯¢åæ°' + JSON.stringify(data)) |
| | | // } |
| | | // if (page) { |
| | | // console.log(111+"======="+ page); |
| | | // this.$message.success('å页忰' + JSON.stringify(page)) |
| | | // } |
| | | // //å页æ¥è¯¢ä¿¡æ¯ |
| | | // callback({ |
| | | // total: 2, |
| | | // data: [{ |
| | | // id: 't2', |
| | | // name: 'test2', |
| | | // description: 'test2', |
| | | // }, { |
| | | // id: 't3', |
| | | // name: 'test3', |
| | | // description: 'test3', |
| | | // }] |
| | | // }) |
| | | // }, |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'id', |
| | | // } |
| | | },{ |
| | | label: 'æ¾ç¤ºç屿§', |
| | | prop: 'text2', |
| | | tip: 'éæ©æ°æ®åï¼æ¾ç¤ºå°å段ä¸çä¿¡æ¯æå±ç屿§ï¼ä¸è¬é½æ¯name,妿æ¯å¤ä¸ªå±æ§ä½¿ç¨éå·åå²ï¼å¦id,name', |
| | | prop: 'textField', |
| | | tip: 'éæ©æ°æ®åï¼æ¾ç¤ºå°å段ä¸çä¿¡æ¯æå±ç屿§ï¼ä¸è¬é½æ¯name,妿æ¯å¤ä¸ªå±æ§ä½¿ç¨éå·åå²ï¼å¦id,nameã', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | value: 'name', |
| | | rules: [{ |
| | | required: true, |
| | | message: "(æ¾ç¤ºç屿§)å¿
填项ä¸è½ä¸ºç©º", |
| | |
| | | }], |
| | | },{ |
| | | label: 'åå¨å¼ç屿§', |
| | | prop: 'text2', |
| | | prop: 'valueField', |
| | | tip: 'éæ©æ°æ®åï¼ä¿åå°æ°æ®åºéç屿§ï¼ä¸è¬é½æ¯oidæè
idï¼å¦ææ¯å¤ä¸ªå±æ§ä½¿ç¨éå·åå²ï¼å¦oid ,id', |
| | | value: 'oid', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | rules: [{ |
| | |
| | | }], |
| | | },{ |
| | | label: 'åç
§çªå£ç±»å', |
| | | prop: 'referWindowType', |
| | | //tip: 'ææ¯ä¸ä¸ªå·¦è¾¹æç¤ºè¯', |
| | | //tipPlacement: 'left', |
| | | prop: 'type', |
| | | tip: 'default:é»è®¤çåç
§çªå£æ ·å¼; stand:UIä¸ä¸æé
ç½®çæ¹å¼; classify:åç±»+æ¡£æ¡çæ¾ç¤º; èªå®ä¹çåç
§ç´æ¥åjsçç»ä»¶è·¯å¾ï¼tree:æ å½¢å±ç¤º;grid:å表å±ç¤º', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | value: 'default', |
| | | type: 'select', |
| | | dicData: [{ |
| | | label: 'é»è®¤æ ·å¼', |
| | | value: 0 |
| | | value: 'default' |
| | | }, { |
| | | label: 'å¹³å°é
ç½®', |
| | | value: 1 |
| | | value: 'stand' |
| | | }, { |
| | | label: 'æ å½¢', |
| | | value: 2 |
| | | value: 'tree' |
| | | }, { |
| | | label: 'å表', |
| | | value: 3 |
| | | value: 'grid' |
| | | }, { |
| | | label: 'é¨é¨æ ', |
| | | value: 4 |
| | | value: 'refer/OrgDepartmentRefer' |
| | | }, { |
| | | label: 'é¨é¨å表', |
| | | value: 5 |
| | | value: 'refer/OrgDepartmentGridRefers' |
| | | }, { |
| | | label: 'ç¨æ·', |
| | | value: 6 |
| | | value: 'refer/SmUserRefer' |
| | | }, { |
| | | label: 'ç¨æ·å表', |
| | | value: 7 |
| | | value: 'refer/SmUserGridRefer' |
| | | }, { |
| | | label: 'è§è²å表', |
| | | value: 8 |
| | | value: 'refer/SmRoleRefer' |
| | | }, { |
| | | label: 'èå¡', |
| | | value: 9 |
| | | value: 'refer/OrgDutyRefer' |
| | | }, { |
| | | label: 'å·¥ç§', |
| | | value: 10 |
| | | value: 'refer/SmWorkTypeRefer' |
| | | }, { |
| | | label: 'æµç¨æ¨¡æ¿', |
| | | value: 11 |
| | | value: 'refer/WfProcessTemplateRefer' |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: "(åç
§çªå£ç±»å)å¿
填项ä¸è½ä¸ºç©º", |
| | | trigger: "blur", |
| | | }], |
| | | change: ({ value, column }) => { |
| | | // å¤å表å,å 为å
¶ä»åç»ä¸å¦æåå¨å¼ï¼å¨åæ¢æ¶,ä¼ä¿çè¾å
¥çåæ®µå¼æä»¥éè¦è¿å |
| | | let oldForm = this.form; |
| | | this.form = {}; // 表å对象èµç©º |
| | | this.form.referType = oldForm.referType |
| | | this.form.textField = oldForm.textField |
| | | this.form.valueField = oldForm.valueField |
| | | this.form.type = oldForm.type //åç
§çªå£ç±»å |
| | | this.form.url = oldForm.url |
| | | this.form.backPath = oldForm.backPath |
| | | this.form.method = oldForm.method |
| | | this.form.height = oldForm.height |
| | | this.form.useFormKey = oldForm.useFormKey |
| | | this.form.paramForFormKey = oldForm.paramForFormKey |
| | | this.form.isMuti = oldForm.isMuti |
| | | this.form.mapFields = oldForm.mapFields |
| | | let addFrom = {}; //æ ¹æ®ç±»åéè¦æ·»å çä¸å屿§ |
| | | if(value == 'stand'){ |
| | | addFrom = { |
| | | referContent: '', |
| | | displayTable: '', |
| | | } |
| | | } else if(value == 'default' || value == 'grid'){ |
| | | addFrom = { |
| | | limit: '15', |
| | | sortField: '', |
| | | sortType: 'asc', |
| | | } |
| | | } else if(value == 'tree'){ |
| | | addFrom = { |
| | | parentFieldName: '', |
| | | parentUsedField: 'oid', |
| | | parentValue: '', |
| | | loadType: 'all', |
| | | onlyLeaf: false, |
| | | sortField: '', |
| | | sortType: 'asc', |
| | | } |
| | | } |
| | | // å并两个表å |
| | | this.form = Object.assign(addFrom,this.form); |
| | | //console.log(this.form); |
| | | }, |
| | | },{ |
| | | label: 'èªå®ä¹çåå°è·¯å¾', |
| | | prop: 'text2', |
| | | tip: 'é常为空;妿æ¯å表ï¼åå°å¿
é¡»è¿åDataGridï¼å¦ææ¯æ ï¼åå°å¿
é¡»è¿åList', |
| | | prop: 'url', |
| | | tip: 'é常为空;妿æ¯å表ï¼åå°å¿
é¡»è¿åDataGridï¼å¦ææ¯æ ï¼åå°å¿
é¡»è¿åList<Tree>', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | },{ |
| | | label: 'æå¡çå°å', |
| | | prop: 'text2', |
| | | prop: 'backPath', |
| | | tip: 'é常为空ï¼å¨æ¯æå¾®æå¡æè
åå¸å¼é¨ç½²çæ¶åæé
ç½®', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | },{ |
| | | label: '请æ±åå°çåè®®æ¹å¼', |
| | | prop: 'text2', |
| | | //tip: '', |
| | | //tipPlacement: 'right', |
| | | prop: 'method', |
| | | tip: 'HTTPçåè®®æ¹å¼ï¼æ¯æPOST,PUT,GETï¼ä¸è¬é½æ¯GET', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | value: 'GET', |
| | | type: 'select', |
| | | dicData: [{ |
| | | label:'GET',value: "GET" |
| | | },{ |
| | | label:'PUT',value: "PUT" |
| | | }, |
| | | { |
| | | label:'POST',value: "POST" |
| | | }], |
| | | },{ |
| | | label: 'çªå£æ¾ç¤ºçé«åº¦', |
| | | prop: 'text2', |
| | | prop: 'height', |
| | | tip: 'é»è®¤ç©ºçï¼è®¾ç½®åè¡¨ç¤ºå¼ºå¶æ¾ç¤ºè¿æ ·çé«åº¦', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | rules:[{ |
| | | validator: validateNumber, |
| | | message: "çªå£æ¾ç¤ºçé«åº¦å¿
须为æ°å¼ç±»å", |
| | | trigger: "blur", |
| | | }] |
| | | },{ |
| | | label: 'è¿æ»¤(级è)屿§', |
| | | prop: 'text2', |
| | | prop: 'useFormKey', |
| | | tip: 'è·å表åä¸çå
¶ä»å±æ§ç屿§ç弿¥è¿æ»¤,æè
ä½¿ç¨æä¸ªå±æ§æ¥çº§èéæ©', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | },{ |
| | | label: 'è¿æ»¤å±æ§è¯·æ±åæ°', |
| | | prop: 'text2', |
| | | prop: 'paramForFormKey', |
| | | tip: '使ç¨è¿æ»¤å±æ§æ¶ï¼åéç»åå°ç请æ±åæ°', |
| | | tipPlacement: 'right', |
| | | span: 7, |
| | | },{ |
| | | label: 'æ¯å¦å¤é', |
| | | type: 'switch', |
| | | prop: 'text2', |
| | | //tip: '', |
| | | //tipPlacement: 'right', |
| | | prop: 'isMuti', |
| | | value: false, |
| | | span: 7, |
| | | row: true, |
| | | },{ |
| | | label: 'æ å°å
¶ä»å±æ§', |
| | | prop: 'text2', |
| | | prop: 'mapFields', |
| | | tip: 'éæ©æ°æ®åï¼å°éæ©çæ°æ®æ·è´å°è¡¨åéçå
¶ä»å±æ§ï¼ä¹¦åæ ¼å¼ä¸º{å½å表åä¸ç屿§:éæ©æ°æ®éç屿§,XXXXx:yyyy}', |
| | | tipPlacement: 'right', |
| | | span: 18, |
| | |
| | | // åå¨ç表ååºå |
| | | group: [ |
| | | { |
| | | display: this.form.referWindowType==0||this.form.referWindowType==3, |
| | | display: this.form.type=='default'||this.form.type=='grid', |
| | | icon: 'el-icon-info', |
| | | label: this.form.referWindowType==0 ? 'é»è®¤åç
§çé
ç½®(䏿¹å表)':'å表åç
§çé
ç½®ï¼ä¸æ¹å表)', |
| | | label: this.form.type=='default' ? 'é»è®¤åç
§çé
ç½®(䏿¹å表)':'å表åç
§çé
ç½®ï¼ä¸æ¹å表)', |
| | | collapse: true, |
| | | prop: 'group1', |
| | | prop: 'groupDdefaultOrGrid', |
| | | column: [ |
| | | { |
| | | label: 'æ¯é¡µæ¾ç¤ºæ¡æ°', |
| | | prop: 'text1', |
| | | prop: 'limit', |
| | | span: 7, |
| | | tip: 'åé¡µæ¶æ¯é¡µæ¾ç¤ºçæ°éï¼ä¸å页填-1', |
| | | //value: 15, |
| | | tipPlacement: 'right', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'text1', |
| | | prop: 'sortField', |
| | | span: 7, |
| | | type: 'table', |
| | | tip: 'æ¥è¯¢æ°æ®æ¶çæåºå段', |
| | | tipPlacement: 'right', |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | // è¿å¿éè¦æ·»å ä¸å¡ç±»åæ¥å£ |
| | | |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'text1', |
| | | prop: 'sortType', |
| | | span: 7, |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | //value: 'asc', |
| | | type: 'select', |
| | | tip: 'æ¥è¯¢æ°æ®æ¶çæåºç±»å', |
| | | tipPlacement: 'right', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | display: this.form.referWindowType==1, |
| | | display: this.form.type=='stand', |
| | | icon: 'el-icon-info', |
| | | label: 'stand(å¹³å°é
ç½®)åç
§', |
| | | collapse: true, |
| | | prop: 'group2', |
| | | prop: 'groupStand', |
| | | column: [ |
| | | { |
| | | label: 'åèçUIä¸ä¸æ', |
| | | prop: 'text1', |
| | | prop: 'referContent', |
| | | span: 7, |
| | | tip: 'åªæåç
§çªå£ç±»åæ¯standæ¶æå¿
须设置,ä¸å¨standç±»å䏿è½çæ', |
| | | tipPlacement: 'right', |
| | | }, |
| | | { |
| | | label: 'å¹³å°çè¡¨æ ¼ç¼å·', |
| | | prop: 'text1', |
| | | prop: 'displayTable', |
| | | span: 7, |
| | | tip: 'ä¸åç
§çUIä¸ä¸æäºæ¥ï¼åªæåç
§çªå£ç±»åæ¯standæ¶æå¿
须设置ï¼ä¸å¨standç±»å䏿è½çæ', |
| | | tipPlacement: 'right', |
| | | type: 'table', |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: '屿§è±æç¼å·', |
| | | width: 120, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'id' |
| | | },{ |
| | | label: '屿§ä¸æåç§°', |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | prop: 'name' |
| | | },{ |
| | | label: '屿§é¿åº¦', |
| | | search: false, |
| | | prop: 'attrLength' |
| | | },{ |
| | | label: '屿§ç±»å', |
| | | search: false, |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | display: this.form.referWindowType==2, |
| | | display: this.form.type=='tree', |
| | | icon: 'el-icon-info', |
| | | label: 'æ å½¢åç
§ä¿¡æ¯', |
| | | collapse: true, |
| | | prop: 'group3', |
| | | prop: 'groupTree', |
| | | labelWidth: '158', |
| | | column: [ |
| | | { |
| | | label: 'æ å½¢çä¸çº§æ å½¢', |
| | | prop: 'text1', |
| | | label: 'æ å½¢çä¸çº§å±æ§', |
| | | prop: 'parentFieldName', |
| | | span: 7, |
| | | tip: 'æ å½¢å±ç¤ºçæ¶åï¼ä¸ä¸çº§å
³ç³»æ¥æ¾ç屿§ã', |
| | | tipPlacement: 'right', |
| | | rules: [{ |
| | | required: true, |
| | | message: "(æ å½¢çä¸çº§å±æ§)å¿
填项ä¸è½ä¸ºç©º", |
| | | trigger: "blur", |
| | | }], |
| | | },{ |
| | | label: 'ä¸çº§å±æ§å¼å¯¹åºå±æ§', |
| | | prop: 'text1', |
| | | prop: 'parentUsedField', |
| | | span: 7, |
| | | tip: 'ä¸çº§å±æ§åå¨çå¼,æ¯ä¸çº§æ°æ®çä»ä¹å±æ§ãä¸è¬é½æ¯oidã', |
| | | value: 'oid', |
| | | tipPlacement: 'right', |
| | | },{ |
| | | label: 'æ ¹èç¹çå¼', |
| | | prop: 'text1', |
| | | prop: 'parentValue', |
| | | span: 7, |
| | | tip: 'æ å½¢å±ç¤ºçæ¶åï¼ä¸çº§çå¼ã', |
| | | tipPlacement: 'right', |
| | | },{ |
| | | label: 'æ å è½½æ¹å¼', |
| | | prop: 'text1', |
| | | prop: 'loadType', |
| | | span: 7, |
| | | value: 'all', |
| | | dicData: [{ |
| | | label: 'å
¨é¨', value: 'all' |
| | | }, { |
| | | label: 'é级å è½½', value: 'node' |
| | | }], |
| | | type: 'select', |
| | | },{ |
| | | label: 'æ¯å¦åªè½éæ©å¶åèç¹', |
| | | prop: 'text1', |
| | | prop: 'onlyLeaf', |
| | | span: 7, |
| | | value: false, |
| | | type: 'switch', |
| | | },{ |
| | | label: 'æåºå段', |
| | | prop: 'text1', |
| | | prop: 'sortField', |
| | | span: 7, |
| | | type: 'table', |
| | | children: { |
| | |
| | | prop: 'attrType' |
| | | }], |
| | | }, |
| | | // è¿å¿éè¦æ·»å ä¸å¡ç±»åæ¥å£è¯·æ±å®ç°å¼¹çªçé¢è¡¨æ ¼æ¸²æ |
| | | },{ |
| | | label: 'æåºç±»å', |
| | | prop: 'text1', |
| | | prop: 'sortType', |
| | | span: 7, |
| | | type: 'select', |
| | | value: 'asc', |
| | | dicData: [{ |
| | | label: 'ååº', value: 'asc' |
| | | }, { |
| | | label: 'éåº', value: 'desc' |
| | | }], |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | clicktest(cell){ |
| | | |
| | | //cell.$cellEdit = true; |
| | | }, |
| | | // 忢å½åæ´»å¨çtabs |
| | | handleClick(tab, event) { |
| | | if(tab.index=='0'){ |
| | | this.onloadAttrData(); |
| | | }else{ |
| | | this.onloadselectReferConfigData(); |
| | | } |
| | | }, |
| | | // éæ©å®åç
§é
ç½®ä¹åç¹å»ä¿åæé®è§¦å |
| | | selectedListReferConfig(){ |
| | | console.log(this.option); |
| | | console.log(this.form.referWindowType); |
| | | //表åéªè¯ |
| | | this.$refs.form.validate((valid, done, msg) => { |
| | | if (valid) { |
| | | let submitForm = this.filterForm(); |
| | | //console.log(submitForm); |
| | | //è½¬æ¢æJSONå符串è¿è¡ç¶ç»ä»¶åæ¾ |
| | | let submitFormJson = JSON.stringify(submitForm); |
| | | //console.log(submitFormJson); |
| | | this.$emit('echoReferConfig', submitFormJson) // 触åupdate:dataå°åç»ä»¶å¼ä¼ éç»ç¶ç»ä»¶ |
| | | //this.isShowReferConfig = false; |
| | | done() |
| | | } else { |
| | | for(let attr in msg) { |
| | | //console.log(msg[attr][0].message); |
| | | this.$message.warning(msg[attr][0].message); |
| | | break; |
| | | } |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | /** å
¶å®éå屿§è¡¨æ ¼çé»è®¤æ°æ®ä¸éè¦å è½½ï¼ |
| | | 使¯å¼¹çªæå¼ä¼æè¡¨æ ¼éè¡é®é¢æä»¥éè¦å¨è¿è°ç¨doLayoutæ¹æ³*/ |
| | |
| | | // 该çé¢çæ°æ®è¿è¡åå§åå¤å |
| | | recoveryDataAndForm(condition){ |
| | | if(condition=='initForm'){ |
| | | let currentType = this.form.type; |
| | | this.form = this.$options.data().form; |
| | | this.form.type = currentType; |
| | | console.log(this.form); |
| | | // this.form.referContent = ''; |
| | | // this.form.displayTable = ''; |
| | | return; |
| | | } |
| | | Object.assign(this.$data,this.$options.data()); |
| | |
| | | if(condition=='addSearchCondition'){ |
| | | console.log('this is open addSearchCondition'); |
| | | }else { |
| | | if(this.form.referType == '' || this.form.referType == null){ |
| | | this.$message.warning("请è¾å
¥åç
§çä¸å¡ç±»å") |
| | | return; |
| | | } |
| | | |
| | | console.log('this is open selectAttr'); |
| | | } |
| | | } |
| | | }, |
| | | // æäº¤è¡¨åä¹åè¿æ»¤æç©ºæä¸éè¦çè¡¨åæ°æ® |
| | | filterForm(){ |
| | | const oldForm = this.form; |
| | | let submittDefaultForm = [ |
| | | 'referType', |
| | | 'textField', |
| | | 'valueField', |
| | | 'type', //åç
§çªå£ç±»å |
| | | 'url', |
| | | 'backPath', |
| | | 'method', |
| | | 'height', |
| | | 'useFormKey', |
| | | 'paramForFormKey', |
| | | 'isMuti', |
| | | 'mapFields', |
| | | ]; |
| | | let addArray = []; |
| | | let newForm ={}; |
| | | // æ ¹æ®ä¸åç±»åè¿æ»¤åºä¸åçç表å屿§ |
| | | if(oldForm.type == 'stand'){ |
| | | addArray = ['referContent', 'displayTable']; |
| | | } else if(oldForm.type == 'default' || oldForm.type == 'grid'){ |
| | | addArray = ['limit', 'sortField', 'sortType']; |
| | | } else if(oldForm.type == 'tree'){ |
| | | addArray = [ |
| | | "parentFieldName", |
| | | 'parentUsedField', |
| | | 'parentValue', |
| | | 'loadType', |
| | | 'onlyLeaf', |
| | | 'sortField', |
| | | 'sortType' |
| | | ]; |
| | | } |
| | | submittDefaultForm = submittDefaultForm.concat(addArray); |
| | | submittDefaultForm.forEach(item=>{ |
| | | //console.log(item); |
| | | if(item == 'isMuti' || item == 'onlyLeaf' || oldForm[item] != '' || oldForm[item] != ''){ |
| | | newForm = Object.assign(newForm,{[item]:oldForm[item]}); |
| | | } |
| | | }); |
| | | // console.log(newForm); |
| | | return newForm; |
| | | }, |
| | | onloadselectReferConfigData(){ |
| | | this.$nextTick(() => { |
| | | this.$refs.selectReferConfigCrud.doLayout() |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/router/axios"; |
| | | |
| | | //è·åæ å½¢ç»ä»¶æ°æ® |
| | | export const getAtrrList = () => { |
| | | return request({ |
| | | url: '/api/ubcs-code/codeClassify/treeCodeClassify', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | //æ èç¹æ·»å |
| | | export const TreeSave = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/save', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //æ£æ¥æ¯å¦å¯ä»¥å é¤ |
| | | export const TreeCheckDel = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/checkIsCanDelete', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //å é¤ |
| | | export const TreeDel = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/deleteData', |
| | | method: 'Delete', |
| | | data:data |
| | | }) |
| | | } |
| | | //ææ¶æé®é¢ |
| | | export const TreeObjcet = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/getObjectByOid', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | //å¯ç¨ |
| | | export const TreeEnable = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/enableData', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //åç¨ |
| | | export const TreeDeactivate = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/disableData', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | export const importClassify = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/importClassify', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | //主é®è·åå类模æ¿å±æ§ |
| | | export const gridCodeClassifyTemplate = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTemplateController/gridCodeClassifyTemplate', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | //åºæ¬ä¿¡æ¯è¡¨åæ°æ® |
| | | export const getObjectByOid = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/getObjectByOid', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | //模æ¿å±æ§è¡¨æ ¼æ°æ® |
| | | export const gridCodeClassifyTemplateAttr = (params) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTempAttrController/gridCodeClassifyTemplateAttr', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 第ä¸å±å¯¹è¯æ¡çæé®åï¼çº¿æ¡ --> |
| | | <el-divider direction="horizontal"></el-divider> |
| | | <el-divider class="horizontal-line" direction="horizontal"></el-divider> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">ä¿ å</el-button> |
| | |
| | | <div class="box"> |
| | | <el-scrollbar style="height: auto; border-bottom-right-radius:8px "> |
| | | <basic-container> |
| | | <div class="abox"> |
| | | <div class="treeBox"> |
| | | <avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/> |
| | | </div> |
| | | </basic-container> |
| | |
| | | <el-button @click="isShowSelectAttrOption = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="selectedListClassifyLinkAttr">ç¡® å®</el-button> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | |
| | | <!-- 第äºå±å¯¹è¯æ¡,屿§ç 段ï¼å
¬å¼ç¼è¾æ¡å¯¹è¯æ¡ç»ä»¶ --> |
| | |
| | | this.form.getValueClass = content; |
| | | }, |
| | | |
| | | /* åç
§é
ç½®,åç»ä»¶å¡«å®åç
§é
ç½®ä¹åå
容忾æ¶è°ç¨ */ |
| | | /* å¼ç¨ç 段åç
§é
ç½®,åç»ä»¶å¡«å®åç
§é
ç½®ä¹åå
容忾æ¶è°ç¨ */ |
| | | echoReferConfig(content){ |
| | | this.form.referConfig = content; |
| | | }, |
| | |
| | | }else if(condition === 'referBtmId'){ |
| | | this.form.referBtmId = ''; |
| | | }else if(condition === 'referConfig'){ |
| | | this.form.referBtmId = ''; |
| | | this.form.referConfig = ''; |
| | | } |
| | | }, |
| | | // è¡¥ä½æ¶çå符ï¼å®ç°å¯è¾å¯é |
| | |
| | | |
| | | </script> |
| | | |
| | | <style scope> |
| | | <style> |
| | | |
| | | .code-rule-crud > .avue-crud__search ,.code-basic-crud > .avue-crud__search { |
| | | margin-bottom: -15px; |
| | |
| | | padding: 1px 6px; |
| | | } |
| | | |
| | | .el-divider--horizontal { |
| | | .horizontal-line { |
| | | /* margin-top: 19px !important; */ |
| | | margin-bottom: -20px !important; |
| | | width: 100%; |
| | | height: 2px; |
| | | } |
| | | |
| | | .el-card__body > .abox { |
| | | .el-card__body > .treeBox { |
| | | height: 50vh; |
| | | } |
| | | |
| | |
| | | width:60px; |
| | | } |
| | | |
| | | .el-input-number { |
| | | .left > .el-form-item > .el-form-item__content > .el-input-number { |
| | | width: 120px; |
| | | } |
| | | |
| | | .el-input-number >.el-input > .el-input__inner { |
| | | .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner { |
| | | width:120px; |
| | | } |
| | | |
| | |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .el-divider--vertical { |
| | | .add-basicsec-form > .el-divider--vertical { |
| | | width: 2px; |
| | | height: 72%; |
| | | margin: 0 auto; |
| | |
| | | /* width: 100%; */ |
| | | border-top: 1px solid #E9E7E7; |
| | | padding: 5px 10px 10px; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.key"></i> |
| | | <i class="el-icon-finished"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | <i class="el-icon-info"></i> |
| | | 䏿åç§° |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | <i class="el-icon-date"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | <i class="el-icon-folder-opened"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.revisionRule"></i> |
| | | <i class="el-icon-s-check"></i> |
| | | çæ¬è§å |
| | | </template> |
| | | {{ obj.versionRule }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.lifeCycle"></i> |
| | | <i class="el-icon-refresh-right"></i> |
| | | çå½å¨æ |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.view"></i> |
| | | <i class="el-icon-view"></i> |
| | | è§å¾ |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | <i class="el-icon-chat-line-square"></i> |
| | | æè¿° |
| | | </template> |
| | | {{ obj.description }} |
| | |
| | | </el-select> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange"> |
| | | </avue-crud> |
| | | <<<<<<< Updated upstream |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandeltrue">ç¡®å®</el-button> |
| | | <el-button @click="dialoghandelfalse">åæ¶</el-button> |
| | | </div> |
| | | ======= |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandelfalse">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialoghandeltrue">ç¡® å®</el-button> |
| | | </span> |
| | | >>>>>>> Stashed changes |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-container> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" @refreshTable="initTreeOnLoad"> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions"> |
| | | </business-add> |
| | | </el-container> |
| | | </template> |
| | |
| | | border: true, |
| | | height: 466, |
| | | editBtn: false, |
| | | index: true, |
| | | rowKey:'oid', |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons:{ |
| | | key: 'el-icon-finished', |
| | | name: 'el-icon-info', |
| | | tableName: 'el-icon-date', |
| | | domain: 'el-icon-folder-opened', |
| | | revisionRule: 'el-icon-s-check', |
| | | lifeCycle: 'el-icon-refresh-right', |
| | | view: 'el-icon-view', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | ref: { |
| | | // ä»è¡¨ä¸éæ©dialogç¶æ |
| | | visible: false, |
| | |
| | | headerAlign: 'center', |
| | | border: true, |
| | | index: true, |
| | | rowKey: 'oid', |
| | | rowKey: 'id', |
| | | tabs: true, |
| | | addBtn: false, |
| | | menu: false, |
| | |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | if(data.oid){ |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | } |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }, |
| | | // åºæ¬ä¿¡æ¯æ·»å |
| | | basicSave(row, done, loading) { |
| | | add(Object.assign({ |
| | | createUser: this.userInfo.name |
| | | }, row)).then(() => { |
| | | this.$message.success('æ°å¢æå') |
| | | done(); |
| | | this.getList(); |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | }, |
| | | //屿§æ·»å |
| | | loadSave(row, done, loading) { |
| | | add(Object.assign({ |
| | | createUser: this.userInfo.name |
| | | }, row)).then(() => { |
| | | this.$message.success('æ°å¢æå') |
| | | done(); |
| | | this.getList(); |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | }, |
| | | selectFromTable() { |
| | | console.log('è·å'); |
| | | this.ref.visible = true; |
| | | }, |
| | | refOnLoad(domain) { |
| | |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | .businessCrud > .el-card > .el-card__body > .avue-crud_menu{ |
| | | display: none!important; |
| | | } |
| | | .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | } |
| | | |
| | | </style> |
| | |
| | | :visible.sync="showSubmitDialog" |
| | | append-to-body |
| | | @close="closeSubmitDialog" |
| | | width="74%" |
| | | width="70%" |
| | | > |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"> |
| | | |
| | |
| | | }, |
| | | domainOption:{ |
| | | type: Array |
| | | }, |
| | | icons: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | showSubmitDialog : false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize:10 |
| | | }, |
| | | option: { |
| | | height: "330px", |
| | | selection: true, |
| | | headerAlign: 'center', |
| | | border: true, |
| | | index: true, |
| | | rowKey: 'oid', |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn:false, |
| | | rowKey: 'id', |
| | | tabs: true, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'left' |
| | | align: 'center' |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | console.log('123'); |
| | | }, |
| | | methods: { |
| | | closeSubmitDialog(){ |
| | |
| | | .descClass > .el-input__inner { |
| | | width: 57vw |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: "classifyTree.vue", |
| | | //使ç¨provideä¼ éç»åç»ä»¶ |
| | | //ç¶ä¼ åæé®é¢ï¼ææ¶æ²¡è§£å³ï¼ç¨provide代æ¿ç¶ä¼ åï¼åä¼ ç¶è¿æ¯ç¨$emitä¼ éï¼æ³¨æï¼ï¼ï¼å
¶ä»ç»ä»¶ä¸è½ä½¿ç¨åæ ·çç±»åå¦å伿¥éã |
| | | provide() { |
| | | return { |
| | | Treeoption: { |
| | | multiple: true, |
| | | formslot: true, |
| | | defaultExpandAll: true, |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [{ |
| | | label: 'èªå®ä¹é¡¹', |
| | | prop: 'label' |
| | | }], |
| | | } |
| | | }, |
| | | Treedata: [ |
| | | { |
| | | value: 0, |
| | | label: 'ä¸çº§é¨é¨', |
| | | children: [ |
| | | { |
| | | value: 1, |
| | | label: 'ä¸çº§é¨é¨1', |
| | | }, { |
| | | value: 2, |
| | | label: 'ä¸çº§é¨é¨2', |
| | | } |
| | | ] |
| | | }, { |
| | | value: 3, |
| | | label: 'äºçº§é¨é¨', |
| | | children: [ |
| | | { |
| | | value: 4, |
| | | label: 'äºçº§é¨é¨1', |
| | | }, { |
| | | value: 5, |
| | | label: 'äºçº§é¨é¨2', |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | crudTreeOption: { |
| | | index: true, |
| | | border: true, |
| | | column: [ |
| | | { |
| | | label: "æµè¯1", |
| | | prop: "cash" |
| | | label: "模æ¿ç¼å·", |
| | | prop: "id" |
| | | }, |
| | | { |
| | | label:"模æ¿åç§°", |
| | | prop:"name" |
| | | }, |
| | | { |
| | | label: "æ¨¡æ¿æè¿°", |
| | | prop:"description" |
| | | }, |
| | | { |
| | | label:"çæ¬å·", |
| | | prop:"revisionSeq" |
| | | }, |
| | | { |
| | | label:"ç¶æ", |
| | | prop:"lcStatusText" |
| | | } |
| | | ] |
| | | }, |
| | |
| | | ] |
| | | } |
| | | ], |
| | | |
| | | arr : [ |
| | | { |
| | | name: 'Alice', |
| | | age: 30, |
| | | children: [ |
| | | { |
| | | name: 'Bob', |
| | | age: 5, |
| | | toys: [ |
| | | { |
| | | name: 'ball', |
| | | color: 'red' |
| | | }, |
| | | { |
| | | name: 'doll', |
| | | color: 'blue' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | name: 'Charlie', |
| | | age: 3, |
| | | toys: [ |
| | | { |
| | | name: 'car', |
| | | color: 'green' |
| | | }, |
| | | { |
| | | name: 'train', |
| | | color: 'yellow' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | },] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: {} |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | //target: 'http://localhost:37000', |
| | | target: 'http://192.168.3.7:37000', |
| | | target: 'http://localhost:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | //target: 'http://dev.vci-tech.com:37000', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | //target: 'https://saber.bladex.vip/api', |
| | |
| | | * nacos dev å°å |
| | | */ |
| | | //String NACOS_DEV_ADDR = "dev.vci-tech.com:38848"; |
| | | String NACOS_DEV_ADDR = "192.168.93.196:38848"; |
| | | String NACOS_DEV_ADDR = "192.168.93.201:38848"; |
| | | |
| | | /** |
| | | * nacos prod å°å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * Description: é¢åçæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/5/15 |
| | | */ |
| | | @Data |
| | | public class DomainVO implements Serializable { |
| | | private static final long serialVersionUID = -2954895662615860362L; |
| | | |
| | | private String value; |
| | | |
| | | private String label; |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/NewAppConstantEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.code.enumpack; |
| | | package com.vci.ubcs.starter.enumpack; |
| | | |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public static void buildConditionByMapString(Map<String, String> query, MPJLambdaWrapper<?> qw) { |
| | | if (!Func.isEmpty(query)) { |
| | | query.forEach((k, v) -> { |
| | | if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) { |
| | | if (k.endsWith("_equal")) { |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | | qw.likeLeft(getColumn(k, "_likeleft"), v); |
| | | } else if (k.endsWith("_likeright")) { |
| | | qw.likeRight(getColumn(k, "_likeright"), v); |
| | | } else if (k.endsWith("_notlike")) { |
| | | qw.notLike(getColumn(k, "_notlike"), v); |
| | | } else if (k.endsWith("_ge")) { |
| | | qw.ge(getColumn(k, "_ge"), v); |
| | | } else if (k.endsWith("_le")) { |
| | | qw.le(getColumn(k, "_le"), v); |
| | | } else if (k.endsWith("_gt")) { |
| | | qw.gt(getColumn(k, "_gt"), v); |
| | | } else if (k.endsWith("_lt")) { |
| | | qw.lt(getColumn(k, "_lt"), v); |
| | | } else if (k.endsWith("_datege")) { |
| | | qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dategt")) { |
| | | qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dateequal")) { |
| | | qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datele")) { |
| | | qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datelt")) { |
| | | qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_null")) { |
| | | qw.isNull(getColumn(k, "_null")); |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private static String getColumn(String column, String keyword) { |
| | | return StringUtil.humpToUnderline(StringUtil.removeSuffix(column, keyword)); |
| | | } |
ÎļþÃû´Ó Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/Map2MPLLambdaUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.ubcs.starter.util; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.mp.support.SqlKeyword; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | |
| | | import java.util.Map; |
| | | |
| | | public class Map2MPLLambdaUtil { |
| | | public class Map2MPJLambdaUtil { |
| | | |
| | | public Map2MPLLambdaUtil() { |
| | | public Map2MPJLambdaUtil() { |
| | | } |
| | | |
| | | public static <T> IPage<T> getPage(Query query) { |
| | |
| | | return getMPJLambdaWrapper(query, exclude, clazz); |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapperByMapString(Map<String, String> query, Class<T> clazz) { |
| | | Kv exclude = Kv.create().set("Blade-Auth", "Blade-Auth").set("current", "current").set("size", "size").set("ascs", "ascs").set("descs", "descs"); |
| | | return getMPJLambdaWrapperByMapString(query, exclude, clazz); |
| | | } |
| | | |
| | | /** |
| | | * map转æ¢ä¸ºMPJLambdaWrapper |
| | | * @param query |
| | |
| | | return qw; |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapperByMapString(Map<String, String> query, Map<String, Object> exclude, Class<T> clazz) { |
| | | exclude.forEach((k, v) -> { |
| | | query.remove(k); |
| | | }); |
| | | MPJLambdaWrapper<T> qw = new MPJLambdaWrapper(); |
| | | qw.setEntity(BeanUtil.newInstance(clazz)); |
| | | MPJLambdaWrapperSqlKeyword.buildConditionByMapString(query, qw); |
| | | return qw; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | private final ICodeButtonService codeButtonService; |
| | | |
| | | CodeButtonMapper codeButtonMapper; |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± 详æ
|
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详æ
", notes = "ä¼ å
¥codebutton") |
| | | public R<CodeButtonVO> detail(CodeButton codebutton) { |
| | | CodeButton detail = codeButtonMapper.selectOne(Condition.getQueryWrapper(codebutton)); |
| | | return R.data(CodeButtonWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± å页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥codebutton") |
| | | public R<IPage<CodeButtonVO>> list(CodeButton codebutton, Query query) { |
| | | IPage<CodeButton> pages = codeButtonMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(codebutton)); |
| | | return R.data(CodeButtonWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± èªå®ä¹å页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥codebutton") |
| | | public R<IPage<CodeButtonVO>> page(CodeButtonVO codebutton, Query query) { |
| | | IPage<CodeButtonVO> pages = codeButtonService.selectcodebuttonPage(Condition.getPage(query), codebutton); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± æ°å¢ |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "æ°å¢", notes = "ä¼ å
¥codebutton") |
| | | public R save(@Valid @RequestBody CodeButton codebutton) { |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "ä¿®æ¹", notes = "ä¼ å
¥codebutton") |
| | | public R update(@Valid @RequestBody CodeButton codebutton) { |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± æ°å¢æä¿®æ¹ |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹", notes = "ä¼ å
¥codebutton") |
| | | public R submit(@Valid @RequestBody CodeButton codebutton) { |
| | | if(codebutton.getOid() != null){ |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton))); |
| | | } |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± å é¤ |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "é»è¾å é¤", notes = "ä¼ å
¥ids") |
| | | public R remove(@ApiParam(value = "主é®éå", required = true) @RequestParam String ids) { |
| | | // return codebuttonService.deleteCodeButton(ids); |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.deleteBatchIds(Func.toStrList(ids)))); |
| | | } |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ä¸çæé®æ©å±å表 |
| | | * @param baseQueryObject åºç¡æ¥è¯¢å¯¹è±¡ï¼å
嫿¥è¯¢æ¡ä»¶ï¼åé¡µï¼æåºç |
| | |
| | | * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | */ |
| | | @GetMapping("/refDataGrid") |
| | | public DataGrid<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(BaseQueryObject baseQueryObject){ |
| | | public IPage<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(BaseQueryObject baseQueryObject){ |
| | | if(baseQueryObject == null){ |
| | | baseQueryObject = new BaseQueryObject(); |
| | | } |
| | |
| | | */ |
| | | IPage<CodeClassifyTemplateAttrVO> gridCodeClassifyTemplateAttr(MPJLambdaWrapper<CodeClassifyTemplateAttr> mpjLambdaWrapper , PageHelper pageHelper) throws VciBaseException; |
| | | |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param codeClassifyTemplateAttrDO æ°æ®å¯¹è±¡ |
| | |
| | | * @throws VciBaseException æ·è´å±æ§åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | CodeClassifyTemplateAttrVO codeClassifyTemplateAttrDO2VO(CodeClassifyTemplateAttr codeClassifyTemplateAttrDO) throws VciBaseException; |
| | | |
| | | |
| | | /** |
| | | * èªå®ä¹å页 |
| | |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | DataGrid<CodeClassifyTemplateAttrVO> gridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper); |
| | | |
| | | |
| | | /** |
| | | * å¢å 主é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | |
| | | * @param pageHelper å页åæåº |
| | | * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | */ |
| | | DataGrid<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper); |
| | | IPage<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸çæææªéæ©ç屿§ |
| | |
| | | * @return |
| | | */ |
| | | DataGrid<CodeOsbtmtypeattributeVO> codeClassifyTemplateAttrByBtm(BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸å·²éæ©ç屿§ |
| | | * @param baseQueryObject |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import com.vci.ubcs.starter.util.PatternUtil; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | |
| | | @Resource |
| | | private CodeClassifyTemplateAttrMapper codeClassifyTemplateAttrMapper; |
| | | |
| | | // @Resource |
| | | // CodeClstempattrMapper codeClstempattrMapper; |
| | | // @Resource |
| | | // ICodeTempphaseService codeTempphaseService; |
| | | // CodeClstempattrMapper codeClstempattrMapper; |
| | | // @Resource |
| | | // ICodeTempphaseService codeTempphaseService; |
| | | |
| | | @Resource |
| | | IDictBizClient iDictBizClient; |
| | | @Resource |
| | |
| | | return voList; |
| | | } |
| | | |
| | | // /** |
| | | // * åç
§ä¸»é¢åºåç±»çæ¨¡æ¿å±æ§å表 |
| | | // * @param conditionMap æ¥è¯¢æ¡ä»¶ |
| | | // * @param pageHelper å页åæåº |
| | | // * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | // * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | // */ |
| | | // @Override |
| | | // public IPage<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, Object> conditionMap, PageHelper pageHelper) throws VciBaseException{ |
| | | // if(conditionMap == null){ |
| | | // conditionMap = new HashMap<String, Object>(); |
| | | // } |
| | | // return gridCodeClassifyTemplateAttr(Map2MPLLambdaUtil.getMPJLambdaWrapper(conditionMap, CodeClassifyTemplateAttr.class),pageHelper); |
| | | // } |
| | | /** |
| | | * åç
§ä¸»é¢åºåç±»çæ¨¡æ¿å±æ§å表 |
| | | * @param conditionMap æ¥è¯¢æ¡ä»¶ |
| | | * @param pageHelper å页åæåº |
| | | * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public IPage<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException{ |
| | | if(conditionMap == null){ |
| | | conditionMap = new HashMap<String, String>(); |
| | | } |
| | | return gridCodeClassifyTemplateAttr(Map2MPJLambdaUtil.getMPJLambdaWrapperByMapString(conditionMap, CodeClassifyTemplateAttr.class),pageHelper); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CodeClassifyTemplateAttrVO> selectCodeClstempattrPage(IPage<CodeClassifyTemplateAttrVO> page, CodeClassifyTemplateAttrVO CodeClstempattr) { |
| | |
| | | return vo; |
| | | } |
| | | |
| | | // @Override |
| | | // @Override |
| | | // public IPage<CodeClassifyTemplateAttrVO> selectCodeClstempattrPage(IPage<CodeClassifyTemplateAttrVO> page, CodeClassifyTemplateAttrVO CodeClstempattr) { |
| | | // return page.setRecords(baseMapper.selectCodeClstempattrPage(page, CodeClstempattr)); |
| | | // } |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid<CodeClassifyTemplateAttrVO> gridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper) { |
| | | DataGrid<CodeClassifyTemplateAttrVO> dataGrid=new DataGrid<CodeClassifyTemplateAttrVO>(); |
| | | DataGrid<CodeClassifyTemplateAttrVO> dataGrid=new DataGrid<>(); |
| | | //没æä¼ éåæ°ï¼å°±ä¸æ§è¡æ¥è¯¢é»è¾ |
| | | if(conditionMap.size()==0){ |
| | | dataGrid.setData(new ArrayList<>()); |
| | |
| | | baseMapper.insert(codeClassifyTemplateAttrDO); |
| | | return codeClassifyTemplateAttrDO2VO(codeClassifyTemplateAttrDO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸»é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | | * @param codeClassifyTemplateAttrDTO 主é¢åºåç±»çæ¨¡æ¿å±æ§æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public DataGrid<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException{ |
| | | if(conditionMap == null){ |
| | | conditionMap = new HashMap<String, String>(); |
| | | } |
| | | return gridCodeClassifyTemplateAttr(conditionMap,pageHelper); |
| | | } |
| | | // @Override |
| | | // public DataGrid<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException{ |
| | | // if(conditionMap == null){ |
| | | // conditionMap = new HashMap<String, String>(); |
| | | // } |
| | | // return gridCodeClassifyTemplateAttr(conditionMap,pageHelper); |
| | | // } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸çæææªéæ©ç屿§ |
| | |
| | | return dataGrid; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸å·²éæ©ç屿§ |
| | | * @param baseQueryObject |
| | |
| | | dataGrid.setTotal(boAttrss.size()); |
| | | return dataGrid; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 忥å°å
¶ä»æ¨¡æ¿ |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.dto.CodeClassifyTemplateButtonDTO; |
| | | import com.vci.ubcs.code.dto.CodeClassifyValueDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.CodeButtonUseEnum; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateButtonMapper; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeButtonVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateButtonVO; |
| | | import com.vci.ubcs.code.wrapper.CodeTempbuttonWrapper; |
| | | import com.vci.ubcs.common.utils.PageDO2PageVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.Map2MPLLambdaUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | CodeClassifyTemplateButton codeClassifyTemplateButton = new CodeClassifyTemplateButton(); |
| | | BeanMap beanMap = BeanMap.create(codeClassifyTemplateButton); |
| | | beanMap.putAll(conditionMap); |
| | | MPJLambdaWrapper<CodeClassifyTemplateButton> mpjLambdaWrapper = Map2MPLLambdaUtil.getMPJLambdaWrapper(codeClassifyTemplateButton) |
| | | MPJLambdaWrapper<CodeClassifyTemplateButton> mpjLambdaWrapper = Map2MPJLambdaUtil.getMPJLambdaWrapper(codeClassifyTemplateButton) |
| | | .selectAll(CodeClassifyTemplateButton.class) |
| | | .selectAs(CodeButton::getName, CodeClassifyTemplateButton::getClassifyButtonOidName) |
| | | .selectAs(CodeButton::getId, CodeClassifyTemplateButton::getClassifyButtonId) |