¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/router/axios"; |
| | | |
| | | export const MasterTable =(params)=>{ |
| | | return request({ |
| | | url: 'api/ubcs-code/ubcs-code//mdmEngineController/getUIInfoByClassifyOid', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const TableData =(params)=>{ |
| | | return request({ |
| | | url: 'api/ubcs-code/ubcs-code//mdmEngineController/gridTableDataByClassifyOid', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | method: 'post', |
| | | data: btmType |
| | | }) |
| | | } |
| | | |
| | | export const btmPage = (current,size,params) => { |
| | | return request ({ |
| | | url: '/api/ubcs-omd/btm-type/page', |
| | | method: 'get', |
| | | params: { |
| | | current, |
| | | size, |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <avue-crud :data="data" ></avue-crud> |
| | | <basic-container style="height: 750px"> |
| | | <avue-crud ref="crud" :data="data" :option="option" style="height: 750px" @sort-change="sortChange"></avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { MasterTable,TableData } from "@/api/GetItem"; |
| | | export default { |
| | | name: "Crud.vue", |
| | | data(){ |
| | | return{ |
| | | data:[], |
| | | option:{} |
| | | data:[ |
| | | { |
| | | zhiliangbz:"111", |
| | | }, |
| | | { |
| | | xinghaoguige:"1121", |
| | | }, |
| | | ], |
| | | option:{ |
| | | //é»è®¤é«åº¦, |
| | | align:'center', |
| | | menuAlign:'center', |
| | | column:[] |
| | | }, |
| | | List:[], |
| | | columnType: { |
| | | text: "input", |
| | | combox: "select", |
| | | truefalse: "switch", |
| | | number: "number", |
| | | datetime: "datetime", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.CrudHeaderRend(); |
| | | this.CrudRend() |
| | | }, |
| | | activated() { |
| | | this.doLayout() |
| | | }, |
| | | methods:{ |
| | | doLayout() { |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | }, |
| | | CrudHeaderRend(){ |
| | | MasterTable({codeClassifyOid:"D9CF223F-317D-71EB-BD11-433A94CAD9F3",functionId: 5,_: 1685067339479}).then(res=>{ |
| | | this.List=res.data.tableDefineVO.cols[0]; |
| | | this.List.forEach(item=>{ |
| | | console.log(item) |
| | | let columnItem={ |
| | | label:item.title, |
| | | prop:item.field, |
| | | type:this.columnType[item.type], |
| | | sortable:item.sort, |
| | | width:item.minWidth |
| | | }; |
| | | this.option.column.push(columnItem); |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | | CrudRend(){ |
| | | TableData({templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | page: 1, |
| | | limit: 9, |
| | | _: 1685089123575 |
| | | }).then(res=>{ |
| | | console.log(res) |
| | | this.data=res.data.data |
| | | }) |
| | | }, |
| | | // æåº |
| | | sortChange(val){ |
| | | console.log(val) |
| | | |
| | | // TableData( { |
| | | // templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F", |
| | | // codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | // order:"desc", |
| | | // sort:val.prop |
| | | // }).then(res=>{ |
| | | // console.log(res.data.data) |
| | | // this.data=res.data.data |
| | | // }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template>
|
| | | <el-dialog
|
| | | :visible.sync="dialogVisible"
|
| | | v-dialogDrag
|
| | | top="0vh"
|
| | | title="æç¤º"
|
| | | class="avue-dialog avue-dialog--top"
|
| | | :width="dialogOptions.width"
|
| | | append-to-body
|
| | | >
|
| | | <avue-form
|
| | | v-model="form"
|
| | | :option="option"
|
| | | v-loading="loading"
|
| | | ref="form"
|
| | | :key="index"
|
| | | >
|
| | | <template :slot="item.prop + 'Label'" v-for="item in option.column">
|
| | | <span>{{ item.label }} </span>
|
| | | <el-tooltip
|
| | | v-if="item.keyAttr"
|
| | | class="item"
|
| | | effect="dark"
|
| | | content="è¯¥å±æ§ä¸ºå
³é®å±æ§"
|
| | | placement="top-start"
|
| | | >
|
| | | <i class="el-icon-star-on key_attr_icon"></i>
|
| | | </el-tooltip>
|
| | | <el-tooltip
|
| | | v-if="item.tip"
|
| | | class="item"
|
| | | effect="dark"
|
| | | :content="item.tip"
|
| | | placement="top-start"
|
| | | >
|
| | | <i class="el-icon-warning"></i>
|
| | | </el-tooltip>
|
| | | </template>
|
| | | </avue-form>
|
| | | <div class="avue-dialog__footer">
|
| | | <el-button @click="close()">å æ¶</el-button>
|
| | | <el-button @click="close()" type="primary">ç¡® å®</el-button>
|
| | | </div>
|
| | | <el-dialog title="æµè¯åç
§" :visible.sync="visible2" append-to-body>
|
| | | <div style="height: 100px;">
|
| | | <p>é¨é¨æ°æ® {depName: 'ææ¯é¨é¨åç§°', depId: 'ææ¯é¨é¨id'}</p>
|
| | | </div>
|
| | | <div class="avue-dialog__footer">
|
| | | <el-button @click="visible2 = false">å æ¶</el-button>
|
| | | <el-button @click="czSubmit" type="primary">ç¡® å®</el-button>
|
| | | </div>
|
| | | </el-dialog>
|
| | | </el-dialog>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { getFormTemplate } from "../../api/common";
|
| | | import { getDictionary } from "../../api/system/dict";
|
| | | export default {
|
| | | name: "FormTemplate",
|
| | | props: {
|
| | | visible: {
|
| | | type: Boolean,
|
| | | default: false,
|
| | | },
|
| | | disabledProp: {
|
| | | type: Array,
|
| | | default: () => ["id"],
|
| | | },
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | index: 0,
|
| | | form: {},
|
| | | loading: false,
|
| | | dialogOptions: {
|
| | | width: "60%",
|
| | | },
|
| | | option: {
|
| | | emptyBtn: false,
|
| | | submitBtn: false,
|
| | | labelWidth: "120",
|
| | | column: [],
|
| | | },
|
| | | templateData: {},
|
| | | columnType: {
|
| | | text: "input",
|
| | | combox: "select",
|
| | | truefalse: "switch",
|
| | | number: "number",
|
| | | textarea: "textarea",
|
| | | datetime: "datetime",
|
| | | date: "date",
|
| | | file: "upload",
|
| | | },
|
| | | // åæ°æ®
|
| | | testItems: [
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "id",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "ä¼ å¼ç¦ç¨åè½",
|
| | | tooltips: "",
|
| | | type: "combox",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "state",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: true,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æ¥å£ç¦ç¨åè½",
|
| | | tooltips: "",
|
| | | type: "combox",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "oldcode",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "el-icon-search",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "ææ¬åç¼æµè¯",
|
| | | text: "ååç¼åè½",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "materialname",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: true,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æ£åæ ¡éªåè½",
|
| | | tooltips: "请è¾å
¥æ°å",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "/[0-9]/",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: [
|
| | | {
|
| | | attributes: {},
|
| | | key: "model_type",
|
| | | value: "模å",
|
| | | },
|
| | | {
|
| | | attributes: {},
|
| | | key: "part_type",
|
| | | value: "é¶ä»¶",
|
| | | },
|
| | | ],
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "dataSelect",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "ç´æ¥è¿å䏿",
|
| | | tooltips: "",
|
| | | type: "combox",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: "formTemplateTest",
|
| | | customClass: null,
|
| | | data: [],
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "dictSelect",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "åå
¸è¿å䏿",
|
| | | tooltips: "",
|
| | | type: "combox",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "firstfl",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æ°åè¾å
¥æ¡",
|
| | | tooltips: "",
|
| | | type: "number",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "yyyy-MM-dd HH:mm:ss",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "datetime",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æ¥ææ¶é´éæ©å¨",
|
| | | tooltips: "",
|
| | | type: "datetime",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "time",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æ¶é´éæ©å¨",
|
| | | tooltips: "",
|
| | | type: "date",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "false",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "xiaoshouwl",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "å¼å
³",
|
| | | tooltips: "",
|
| | | type: "truefalse",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "ææ¯é»è®¤å¼",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "tuhao",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "é»è®¤å¼åè½",
|
| | | tooltips: "æç¤º",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "xinghaoguige",
|
| | | hidden: false,
|
| | | keyAttr: true,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "屿§å
³é®å¼",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "jiliangdw",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | tip: "ææ¯æç¤ºåè½",
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: "jiliangdwname",
|
| | | suffix: "",
|
| | | text: "æç¤ºåè½",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: "this.form.sum = this.form.fun1 + this.form.fun2",
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "fun1",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "åæ°1æµè¯js",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: "this.form.sum = this.form.fun1 + this.form.fun2",
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "fun2",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: "hesuanfenleiname",
|
| | | suffix: "",
|
| | | text: "åæ°2æµè¯js",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: "",
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "sum",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: true,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: "",
|
| | | suffix: "",
|
| | | text: "åæ°1åæ°2æ±å",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "textarea",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "ææ¬å",
|
| | | tooltips: "",
|
| | | type: "textarea",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "beizhushuoming",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: false,
|
| | | referConfig: null,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: null,
|
| | | suffix: "",
|
| | | text: "æä»¶åè½",
|
| | | tooltips: "",
|
| | | type: "file",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | {
|
| | | comboxKey: null,
|
| | | customClass: null,
|
| | | data: null,
|
| | | dateFormate: "",
|
| | | defaultValue: "",
|
| | | displayExtension: null,
|
| | | extendAttrMap: null,
|
| | | extendAttrString: null,
|
| | | field: "cz",
|
| | | hidden: false,
|
| | | keyAttr: false,
|
| | | prefix: "",
|
| | | readOnly: true,
|
| | | referConfig: true,
|
| | | required: false,
|
| | | selectLibFlag: "",
|
| | | showField: "depId",
|
| | | suffix: "",
|
| | | text: "åç
§",
|
| | | tooltips: "",
|
| | | type: "text",
|
| | | unique: false,
|
| | | verify: "",
|
| | | },
|
| | | ],
|
| | | visible2: false,
|
| | | };
|
| | | },
|
| | | created() {
|
| | | },
|
| | | computed: {
|
| | | dialogVisible: {
|
| | | get() {
|
| | | return this.visible;
|
| | | },
|
| | | set(val) {
|
| | | this.$emit("update:visible", val);
|
| | | },
|
| | | },
|
| | | },
|
| | | methods: {
|
| | | getFormTemplate() {
|
| | | this.loading = true;
|
| | | getFormTemplate({
|
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
|
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
|
| | | page: 1,
|
| | | limit: 30,
|
| | | })
|
| | | .then((res) => {
|
| | | if (res.status === 200) {
|
| | | this.templateData = res.data;
|
| | | this.templateRender();
|
| | | }
|
| | | this.loading = false;
|
| | | console.log(res.data);
|
| | | })
|
| | | .catch((err) => {
|
| | | this.loading = false;
|
| | | console.log(err);
|
| | | });
|
| | | },
|
| | | templateRender() {
|
| | | // const items = this.templateData.formDefineVO.items;
|
| | | const items = this.testItems;
|
| | | let column = [];
|
| | | let dictKeys = [];
|
| | | items.forEach((item) => {
|
| | | // éè表åå
ç´
|
| | | if (item.hide) {
|
| | | return;
|
| | | }
|
| | | // ææºåå
¸keyç»ä¸å¼æ¥è¯·æ±è·å
|
| | | if (!this.$utilFunc.isEmpty(item.comboxKey)) {
|
| | | dictKeys.push({ dictKey: item.comboxKey, field: item.field });
|
| | | }
|
| | | // ç¦ç¨é¨å屿§
|
| | | if (this.disabledProp.includes(item.field)) {
|
| | | item.disabled = true;
|
| | | }
|
| | | // è®¾ç½®è¡¨åæ ¡éªçè§åï¼ææ¬
|
| | | let message = "è¯·éæ©";
|
| | | let trigger = "change";
|
| | | if (item.type === "text") {
|
| | | message = "请è¾å
¥";
|
| | | trigger = "blur";
|
| | | } else if (item.type === "file") {
|
| | | message = "请ä¸ä¼ ";
|
| | | }
|
| | | let columnItem = {
|
| | | label: item.text,
|
| | | labelslot: true,
|
| | | prop: item.referConfig ? item.showField : item.field,
|
| | | type: this.columnType[item.type],
|
| | | dicData: this.getDataList(item.type, item.data),
|
| | | disabled: item.disabled,
|
| | | readonly: item.readOnly,
|
| | | prepend: this.preOrSufFixShow("text", item.prefix),
|
| | | append: this.preOrSufFixShow("text", item.suffix),
|
| | | prefixIcon: this.preOrSufFixShow("icon", item.prefix),
|
| | | suffixIcon: this.preOrSufFixShow("icon", item.suffix),
|
| | | valueFormat: item.dateFormate,
|
| | | format: item.dateFormate,
|
| | | keyAttr: item.keyAttr,
|
| | | value: item.defaultValue,
|
| | | tip: item.tip,
|
| | | comboxKey: item.comboxKey,
|
| | | change: ({ value, column }) => {
|
| | | this.changeFun(value, column, item.displayExtension);
|
| | | },
|
| | | click: this.clickFun(item.referConfig),
|
| | | // action:
|
| | | // item.type === "file"
|
| | | // ? "/api/ubcs-resource/oss/endpoint/put-file"
|
| | | // : "",
|
| | | // propsHttp: {
|
| | | // res: "data",
|
| | | // url: "link",
|
| | | // },
|
| | | rules: [
|
| | | {
|
| | | required: item.required,
|
| | | message: `请${message}${item.text}`,
|
| | | trigger,
|
| | | },
|
| | | {
|
| | | // å¦ææ²¡ææ£ååå¹é
ä»»ä½å符
|
| | | pattern: item.verify ? item.verify : /[\s\S.]*/g,
|
| | | message: item.tooltips,
|
| | | trigger,
|
| | | },
|
| | | ],
|
| | | props: {
|
| | | label: "value",
|
| | | value: "key",
|
| | | },
|
| | | };
|
| | | column.push(columnItem);
|
| | | this.$set(this.option, "column", column);
|
| | | });
|
| | | this.index++;
|
| | | this.geDictData(dictKeys);
|
| | | },
|
| | | changeFun(value, column, jsCode) {
|
| | | if (typeof jsCode === "string" && jsCode.length > 0) {
|
| | | eval(jsCode);
|
| | | }
|
| | | },
|
| | | clickFun(referConfig) {
|
| | | if (referConfig) {
|
| | | return () => {
|
| | | this.visible2 = true
|
| | | }
|
| | | }
|
| | | },
|
| | | czSubmit() {
|
| | | this.visible2 = false
|
| | | this.form = Object.assign(this.form, {
|
| | | depName: "ææ¯é¨é¨åç§°",
|
| | | depId: "ææ¯é¨é¨id",
|
| | | });
|
| | | },
|
| | | close() {
|
| | | this.dialogVisible = false;
|
| | | },
|
| | | // ååç¼
|
| | | preOrSufFixShow(type, val) {
|
| | | if (this.$utilFunc.isEmpty(val) && typeof val !== "string") return;
|
| | | const isIcon = val.slice(0, 8) === "el-icon-";
|
| | | if ((type === "text" && !isIcon) || (type === "icon" && isIcon)) {
|
| | | return val;
|
| | | }
|
| | | },
|
| | | // è·åswichåå·²æ¿å°çä¸ææ°æ®
|
| | | getDataList(type, dicData) {
|
| | | if (type === "truefalse") {
|
| | | return [
|
| | | {
|
| | | key: false,
|
| | | value: "å¦",
|
| | | },
|
| | | {
|
| | | key: true,
|
| | | value: "æ¯",
|
| | | },
|
| | | ];
|
| | | } else if (type === "combox") {
|
| | | return dicData;
|
| | | }
|
| | | return [];
|
| | | },
|
| | | // è·ååå
¸æ°æ®
|
| | | geDictData(dictKeys) {
|
| | | dictKeys.forEach((dictObj) => {
|
| | | getDictionary({ code: dictObj.dictKey }).then((res) => {
|
| | | if (res.data && res.data.code === 200) {
|
| | | this.option.column = this.option.column.map((item) => {
|
| | | if (item.field === dictObj.field) {
|
| | | let dictData = (res.data.data || []).map((itm) => {
|
| | | itm.value = itm.dictValue;
|
| | | itm.key = itm.dictKey;
|
| | | return itm;
|
| | | });
|
| | | item.dicData = dictData;
|
| | | }
|
| | | return item;
|
| | | });
|
| | | }
|
| | | });
|
| | | });
|
| | | },
|
| | | },
|
| | | watch: {
|
| | | visible(newV) {
|
| | | if (newV) {
|
| | | this.getFormTemplate();
|
| | | }
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped>
|
| | | .key_attr_icon {
|
| | | font-size: 24px;
|
| | | position: relative;
|
| | | top: 2px;
|
| | | color: red;
|
| | | }
|
| | | // è§£å³swichç»ä»¶ä¸åç´å±
ä¸çé®é¢
|
| | | /deep/ .el-switch {
|
| | | vertical-align: baseline;
|
| | | }
|
| | | </style>
|
| | | <template> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | v-dialogDrag |
| | | top="0vh" |
| | | title="æç¤º" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="dialogOptions.width" |
| | | append-to-body |
| | | > |
| | | <avue-form |
| | | v-model="form" |
| | | :option="option" |
| | | v-loading="loading" |
| | | ref="form" |
| | | :key="index" |
| | | > |
| | | <template :slot="item.prop + 'Label'" v-for="item in option.column"> |
| | | <span>{{ item.label }} </span> |
| | | <el-tooltip |
| | | v-if="item.keyAttr" |
| | | class="item" |
| | | effect="dark" |
| | | content="è¯¥å±æ§ä¸ºå
³é®å±æ§" |
| | | placement="top-start" |
| | | > |
| | | <i class="el-icon-star-on key_attr_icon"></i> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | v-if="item.tip" |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.tip" |
| | | placement="top-start" |
| | | > |
| | | <i class="el-icon-warning"></i> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-form> |
| | | <div class="avue-dialog__footer"> |
| | | <el-button @click="close()">å æ¶</el-button> |
| | | <el-button @click="close()" type="primary">ç¡® å®</el-button> |
| | | </div> |
| | | <el-dialog title="æµè¯åç
§" :visible.sync="visible2" append-to-body> |
| | | <div style="height: 100px;"> |
| | | <p>é¨é¨æ°æ® {depName: 'ææ¯é¨é¨åç§°', depId: 'ææ¯é¨é¨id'}</p> |
| | | </div> |
| | | <div class="avue-dialog__footer"> |
| | | <el-button @click="visible2 = false">å æ¶</el-button> |
| | | <el-button @click="czSubmit" type="primary">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFormTemplate } from "../../api/common"; |
| | | import { getDictionary } from "../../api/system/dict"; |
| | | export default { |
| | | name: "FormTemplate", |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | disabledProp: { |
| | | type: Array, |
| | | default: () => ["id"], |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | index: 0, |
| | | form: {}, |
| | | loading: false, |
| | | dialogOptions: { |
| | | width: "60%", |
| | | }, |
| | | option: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | labelWidth: "120", |
| | | column: [], |
| | | }, |
| | | templateData: {}, |
| | | columnType: { |
| | | text: "input", |
| | | combox: "select", |
| | | truefalse: "switch", |
| | | number: "number", |
| | | textarea: "textarea", |
| | | datetime: "datetime", |
| | | date: "date", |
| | | file: "upload", |
| | | }, |
| | | // åæ°æ® |
| | | testItems: [ |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "id", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "ä¼ å¼ç¦ç¨åè½", |
| | | tooltips: "", |
| | | type: "combox", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "state", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: true, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æ¥å£ç¦ç¨åè½", |
| | | tooltips: "", |
| | | type: "combox", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "oldcode", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "el-icon-search", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "ææ¬åç¼æµè¯", |
| | | text: "ååç¼åè½", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "materialname", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: true, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æ£åæ ¡éªåè½", |
| | | tooltips: "请è¾å
¥æ°å", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "/[0-9]/", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: [ |
| | | { |
| | | attributes: {}, |
| | | key: "model_type", |
| | | value: "模å", |
| | | }, |
| | | { |
| | | attributes: {}, |
| | | key: "part_type", |
| | | value: "é¶ä»¶", |
| | | }, |
| | | ], |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "dataSelect", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "ç´æ¥è¿å䏿", |
| | | tooltips: "", |
| | | type: "combox", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: "formTemplateTest", |
| | | customClass: null, |
| | | data: [], |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "dictSelect", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "åå
¸è¿å䏿", |
| | | tooltips: "", |
| | | type: "combox", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "firstfl", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æ°åè¾å
¥æ¡", |
| | | tooltips: "", |
| | | type: "number", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "yyyy-MM-dd HH:mm:ss", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "datetime", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æ¥ææ¶é´éæ©å¨", |
| | | tooltips: "", |
| | | type: "datetime", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "time", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æ¶é´éæ©å¨", |
| | | tooltips: "", |
| | | type: "date", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "false", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "xiaoshouwl", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "å¼å
³", |
| | | tooltips: "", |
| | | type: "truefalse", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "ææ¯é»è®¤å¼", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "tuhao", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "é»è®¤å¼åè½", |
| | | tooltips: "æç¤º", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "xinghaoguige", |
| | | hidden: false, |
| | | keyAttr: true, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "屿§å
³é®å¼", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "jiliangdw", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | tip: "ææ¯æç¤ºåè½", |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: "jiliangdwname", |
| | | suffix: "", |
| | | text: "æç¤ºåè½", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: "this.form.sum = this.form.fun1 + this.form.fun2", |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "fun1", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "åæ°1æµè¯js", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: "this.form.sum = this.form.fun1 + this.form.fun2", |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "fun2", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: "hesuanfenleiname", |
| | | suffix: "", |
| | | text: "åæ°2æµè¯js", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: "", |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "sum", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: true, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: "", |
| | | suffix: "", |
| | | text: "åæ°1åæ°2æ±å", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "textarea", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "ææ¬å", |
| | | tooltips: "", |
| | | type: "textarea", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "beizhushuoming", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: false, |
| | | referConfig: null, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: null, |
| | | suffix: "", |
| | | text: "æä»¶åè½", |
| | | tooltips: "", |
| | | type: "file", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | { |
| | | comboxKey: null, |
| | | customClass: null, |
| | | data: null, |
| | | dateFormate: "", |
| | | defaultValue: "", |
| | | displayExtension: null, |
| | | extendAttrMap: null, |
| | | extendAttrString: null, |
| | | field: "cz", |
| | | hidden: false, |
| | | keyAttr: false, |
| | | prefix: "", |
| | | readOnly: true, |
| | | referConfig: true, |
| | | required: false, |
| | | selectLibFlag: "", |
| | | showField: "depId", |
| | | suffix: "", |
| | | text: "åç
§", |
| | | tooltips: "", |
| | | type: "text", |
| | | unique: false, |
| | | verify: "", |
| | | }, |
| | | ], |
| | | visible2: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | dialogVisible: { |
| | | get() { |
| | | return this.visible; |
| | | }, |
| | | set(val) { |
| | | this.$emit("update:visible", val); |
| | | }, |
| | | }, |
| | | }, |
| | | methods: { |
| | | getFormTemplate() { |
| | | this.loading = true; |
| | | getFormTemplate({ |
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | page: 1, |
| | | limit: 30, |
| | | }) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | this.templateData = res.data; |
| | | this.templateRender(); |
| | | } |
| | | this.loading = false; |
| | | console.log(res.data); |
| | | }) |
| | | .catch((err) => { |
| | | this.loading = false; |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | templateRender() { |
| | | // const items = this.templateData.formDefineVO.items; |
| | | const items = this.testItems; |
| | | let column = []; |
| | | let dictKeys = []; |
| | | items.forEach((item) => { |
| | | // éè表åå
ç´ |
| | | if (item.hide) { |
| | | return; |
| | | } |
| | | // ææºåå
¸keyç»ä¸å¼æ¥è¯·æ±è·å |
| | | if (!this.$utilFunc.isEmpty(item.comboxKey)) { |
| | | dictKeys.push({ dictKey: item.comboxKey, field: item.field }); |
| | | } |
| | | // ç¦ç¨é¨å屿§ |
| | | if (this.disabledProp.includes(item.field)) { |
| | | item.readOnly = true; |
| | | } |
| | | // è®¾ç½®è¡¨åæ ¡éªçè§åï¼ææ¬ |
| | | let message = "è¯·éæ©"; |
| | | let trigger = "change"; |
| | | if (item.type === "text") { |
| | | message = "请è¾å
¥"; |
| | | trigger = "blur"; |
| | | } else if (item.type === "file") { |
| | | message = "请ä¸ä¼ "; |
| | | } |
| | | let columnItem = { |
| | | label: item.text, |
| | | labelslot: true, |
| | | prop: item.referConfig ? item.showField : item.field, |
| | | type: this.columnType[item.type], |
| | | dicData: this.getDataList(item.type, item.data), |
| | | disabled: item.readOnly, |
| | | prepend: this.preOrSufFixShow("text", item.prefix), |
| | | append: this.preOrSufFixShow("text", item.suffix), |
| | | prefixIcon: this.preOrSufFixShow("icon", item.prefix), |
| | | suffixIcon: this.preOrSufFixShow("icon", item.suffix), |
| | | valueFormat: item.dateFormate, |
| | | format: item.dateFormate, |
| | | keyAttr: item.keyAttr, |
| | | value: item.defaultValue, |
| | | tip: item.tip, |
| | | comboxKey: item.comboxKey, |
| | | change: ({ value, column }) => { |
| | | this.changeFun(value, column, item.displayExtension); |
| | | }, |
| | | click: this.clickFun(item.referConfig), |
| | | // action: |
| | | // item.type === "file" |
| | | // ? "/api/ubcs-resource/oss/endpoint/put-file" |
| | | // : "", |
| | | // propsHttp: { |
| | | // res: "data", |
| | | // url: "link", |
| | | // }, |
| | | rules: [ |
| | | { |
| | | required: item.required, |
| | | message: `请${message}${item.text}`, |
| | | trigger, |
| | | }, |
| | | { |
| | | // å¦ææ²¡ææ£ååå¹é
ä»»ä½å符 |
| | | pattern: item.verify ? item.verify : /[\s\S.]*/g, |
| | | message: item.tooltips, |
| | | trigger, |
| | | }, |
| | | ], |
| | | props: { |
| | | label: "value", |
| | | value: "key", |
| | | }, |
| | | }; |
| | | column.push(columnItem); |
| | | this.$set(this.option, "column", column); |
| | | }); |
| | | this.index++; |
| | | this.geDictData(dictKeys); |
| | | }, |
| | | changeFun(value, column, jsCode) { |
| | | if (typeof jsCode === "string" && jsCode.length > 0) { |
| | | eval(jsCode); |
| | | } |
| | | }, |
| | | clickFun(referConfig) { |
| | | if (referConfig) { |
| | | return () => { |
| | | this.visible2 = true |
| | | } |
| | | } |
| | | }, |
| | | czSubmit() { |
| | | this.visible2 = false |
| | | this.form = Object.assign(this.form, { |
| | | depName: "ææ¯é¨é¨åç§°", |
| | | depId: "ææ¯é¨é¨id", |
| | | }); |
| | | }, |
| | | close() { |
| | | this.dialogVisible = false; |
| | | }, |
| | | // ååç¼ |
| | | preOrSufFixShow(type, val) { |
| | | if (this.$utilFunc.isEmpty(val) && typeof val !== "string") return; |
| | | const isIcon = val.slice(0, 8) === "el-icon-"; |
| | | if ((type === "text" && !isIcon) || (type === "icon" && isIcon)) { |
| | | return val; |
| | | } |
| | | }, |
| | | // è·åswichåå·²æ¿å°çä¸ææ°æ® |
| | | getDataList(type, dicData) { |
| | | if (type === "truefalse") { |
| | | return [ |
| | | { |
| | | key: false, |
| | | value: "å¦", |
| | | }, |
| | | { |
| | | key: true, |
| | | value: "æ¯", |
| | | }, |
| | | ]; |
| | | } else if (type === "combox") { |
| | | return dicData; |
| | | } |
| | | return []; |
| | | }, |
| | | // è·ååå
¸æ°æ® |
| | | geDictData(dictKeys) { |
| | | dictKeys.forEach((dictObj) => { |
| | | getDictionary({ code: dictObj.dictKey }).then((res) => { |
| | | if (res.data && res.data.code === 200) { |
| | | this.option.column = this.option.column.map((item) => { |
| | | if (item.field === dictObj.field) { |
| | | let dictData = (res.data.data || []).map((itm) => { |
| | | itm.value = itm.dictValue; |
| | | itm.key = itm.dictKey; |
| | | return itm; |
| | | }); |
| | | item.dicData = dictData; |
| | | } |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | visible(newV) { |
| | | if (newV) { |
| | | this.getFormTemplate(); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .key_attr_icon { |
| | | font-size: 24px; |
| | | position: relative; |
| | | top: 2px; |
| | | color: red; |
| | | } |
| | | // è§£å³swichç»ä»¶ä¸åç´å±
ä¸çé®é¢ |
| | | /deep/ .el-switch { |
| | | vertical-align: baseline; |
| | | } |
| | | </style> |
| | |
| | | import referConfigFormDialog from "@/components/code-dialog-page/referConfigFormDialog" |
| | | import businessAdd from "@/views/modeling/BusinessAdd" |
| | | import TableCrud from "@/components/Crud/Crud" |
| | | import originalAdd from "@/views/modeling/originalAdd" |
| | | |
| | | // å°å·¥å
·å½æ°æ·»å å°å
¨å± |
| | | import utilFunc from './util/func' |
| | |
| | | Vue.component('businessAdd',businessAdd) |
| | | Vue.component('attrCrud',attrCrud) |
| | | Vue.component('TableCrud',TableCrud) |
| | | Vue.component('originalAdd',originalAdd) |
| | | |
| | | |
| | | // å è½½ç¸å
³urlå°å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-button @click="outerVisible = true">æµç¨æµè¯</el-button> |
| | | <el-dialog :title="`æ§è¡${title}`" width="90%" append-to-body="true" :visible.sync="outerVisible"> |
| | | <div class="dialogwarp"> |
| | | <div class="dialogwarp_tab"> |
| | | <el-card class="dialogwarp_tab_card"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="ä¸å¡æ°æ®ä¿¡æ¯" name="first"> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æµç¨è·è¸ª" name="second"> |
| | | <avue-crud :data="data" :option="option" ref="crud"> |
| | | </avue-crud> |
| | | <el-image style="width: 100%; height: 100%" :src="url" fit="cover"></el-image> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </div> |
| | | <div class="dialogwarp_card"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>å½åä»»å¡ï¼</span> |
| | | <span>{{ title }}</span> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>请å¨ä¸æ¹è¾å
¥æ¨çå®¡æ¹æè§ï¼</p> |
| | | <el-input type="textarea" :rows="4" placeholder="请è¾å
¥å
容" v-model="opinionVal"> |
| | | </el-input> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å®¡æ¹æè§éä»¶ï¼</p> |
| | | <el-upload drag action="https://jsonplaceholder.typicode.com/posts/" multiple |
| | | style="width: 100%;"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å·²ä¸ä¼ å®¡æ¹æä»¶ï¼</p> |
| | | <el-card class="box-card"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table-column prop="date" label="æä»¶å"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="ä¸ä¼ 人 "> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æä½"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <el-button v-if="!isRefuse" type="primary" size="mini" @click="handelAgree">åæ</el-button> |
| | | <el-button v-if="!isAgree" type="primary" size="mini" @click="handelRefuse">ä¸åæ</el-button> |
| | | <el-button v-if="isAgree && !isRefuse" type="primary" size="mini" @click="handelRevert" |
| | | v-for="item in btnList" :key="item">{{ item }}</el-button> |
| | | <el-button v-if="isRefuse" type="primary" size="mini" @click="handelExecute">æ§è¡</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | outerVisible: false, |
| | | destroyClose: true, |
| | | activeName: 'first', |
| | | fits: ['fill', 'contain', 'cover', 'none', 'scale-down'], |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | title: 'ä¸å¡æµè¯-ç³è¯·-ç©å-å®¡æ ¸', |
| | | data: [ |
| | | { |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | } |
| | | ], |
| | | btnList: ['è¿å1', 'è¿å1', 'è¿å1'], |
| | | isAgree: false, |
| | | isRefuse: false, |
| | | opinionVal: '', |
| | | option: { |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | index: true, |
| | | header: false, |
| | | stripe: true, |
| | | indexLabelClassName: 'åºå·', |
| | | column: [ |
| | | { label: 'ä»»å¡åç§°', prop: 'name', minWidth: 120 }, |
| | | { label: 'æ§è¡æä½', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å¼å§æ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å®¡æ¹æè§', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | { label: 'æ§è¡äºº', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å®ææ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å·²ä¸ä¼ å®¡æ¹æä»¶', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | closeDialog() { |
| | | this.destroyClose = true |
| | | this.outerVisible = false |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(event) |
| | | }, |
| | | handelAgree() { |
| | | this.isAgree = !this.isAgree |
| | | this.outerVisible = false |
| | | console.log(this.isAgree) |
| | | }, |
| | | handelRefuse() { |
| | | if (!this.opinionVal) { |
| | | this.$alert('å½å¤çæ¹å¼ä¸ºä¸åææ¶ï¼éè¦å¡«åå®¡æ¹æè§', 'æç¤ºä¿¡æ¯', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | }).then(() => { |
| | | |
| | | }); |
| | | } else { |
| | | this.isRefuse = true |
| | | this.isAgree = true |
| | | this.outerVisible = false |
| | | this.opinionVal = '' |
| | | } |
| | | }, |
| | | handelExecute() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | this.isRefuse = false |
| | | }, |
| | | handelRevert() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .dialogwarp { |
| | | display: -webkit-box; |
| | | display: -ms-flexbox; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 70vh; |
| | | |
| | | &_tab { |
| | | width: 79%; |
| | | |
| | | |
| | | &_card { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | &_card { |
| | | // margin-left: 20px; |
| | | width: 20%; |
| | | } |
| | | } |
| | | |
| | | /deep/ .el-upload, |
| | | /deep/ .el-upload-dragger { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | /deep/ .el-upload-dragger .el-icon-upload { |
| | | margin: 15px 0 16px; |
| | | } |
| | | </style> |
| | |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud v-model="form" :option="option" :data="data" ref="crud" @on-load="onLoad" @row-save="rowSave" |
| | | @row-update="rowUpdate" :before-open="beforeOpen" @row-del="rowDel" :page.sync="page" |
| | | @refresh-change="refreshChange" @row-click="rowClick" |
| | | @selection-change="selectChange"> |
| | | <template slot-scope="{row,index,type}" slot="selInputForm"> |
| | | <div style="margin-left: 75px"> |
| | | <el-input v-model="form.text" :size="size" style="width: 210px" :readonly="true" @focus="selectBtmType" :disabled="referType.disable"></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" |
| | | :label="row.$index"> |
| | | </el-radio> |
| | | <avue-crud v-model="form" |
| | | ref="crud" |
| | | :option="option" |
| | | :data="data" |
| | | @on-load="onLoad" |
| | | :page.sync="page" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" |
| | | :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | <template slot="menu"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">ç¼è¾</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">å é¤</el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="addSave">æ° å¢ |
| | | </el-button> |
| | | <el-button size="small" |
| | | plain |
| | | type="primary" |
| | |
| | | <avue-crud v-model="applyRange.model" :option="applyRange.option" :data="applyRange.data" class="applyRangeTable" |
| | | ></avue-crud> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="referType.display" append-to-body :title="referType.title" width="1000px"> |
| | | <original-range @rowchange="rowchange"></original-range> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandelfalse">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialoghandeltrue">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- <el-dialog :visible.sync="packageLinkBox" append-to-body title="æ¥ç龿¥ç±»å" width="1000px"> |
| | | <original-link @rowLinkchange="rowLinkchange"></original-link> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="Linkdialoghandelfalse">å æ¶</el-button> |
| | | <el-button type="primary" @click="Linkdialoghandeltrue">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> --> |
| | | </basic-container> |
| | | </el-main> |
| | | <el-aside> |
| | | <basic-container class="itemForm"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="屿§é¡¹" name="attrTab"> |
| | | <el-form ref="form" :model="itemData" label-width="80px" style="height: 656px;"> |
| | | <el-form-item label="屿§ç¼ç "> |
| | | <el-input v-model="itemData.id" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="屿§åç§°"> |
| | | <el-input v-model="itemData.name" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="屿§ç±»å"> |
| | | <el-input v-model="itemData.typeValue" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ç¾"> |
| | | <el-input v-model="itemData.hashtag" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é»è®¤å¼"> |
| | | <el-input v-model="itemData.defaultValue" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å
许为空"> |
| | | <el-switch v-model="itemData.nullable" :disabled="true"></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦"> |
| | | <el-input v-model="itemData.maxLength" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°"> |
| | | <el-input v-model="itemData.description" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åç
§" name="valueTab"> |
| | | <el-form ref="form" :model="itemData" label-width="80px" style="height: 656px;"> |
| | | <el-form-item label="åç
§ç±»å"> |
| | | <el-input v-model="itemData.referTypeValue" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åç
§åç§°"> |
| | | <el-input v-model="itemData.referToName" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-descriptions class="margin-top" :column="1" size="medium" border title="屿§é¡¹"> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 屿§ç¼å· |
| | | </template> |
| | | {{ itemForm.itemData.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 屿§åç§° |
| | | </template> |
| | | {{ itemForm.itemData.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 屿§ç±»å |
| | | </template> |
| | | {{ itemForm.itemData.typeValue }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æ ç¾ |
| | | </template> |
| | | {{ itemForm.itemData.hashtag }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | é»è®¤å¼ |
| | | </template> |
| | | {{ itemForm.itemData.defaultValue }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | å
许为空 |
| | | </template> |
| | | {{ itemForm.itemData.nullable }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | é¿åº¦ |
| | | </template> |
| | | {{ itemForm.itemData.maxLength }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æè¿° |
| | | </template> |
| | | {{ itemForm.itemData.description }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <div style="height:15px"></div> |
| | | <el-descriptions class="margin-top" :column="1" size="medium" border title="屿§é
ç½®"></el-descriptions> |
| | | <el-tabs v-model="itemForm.activeName" @tab-click="handleClick" stretch="true" style="height:235px"> |
| | | <el-tab-pane label="åç
§" name="referTab"> |
| | | <el-descriptions class="margin-top" :column="1" size="medium" border> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 使ç¨åç
§ |
| | | </template> |
| | | {{ itemForm.itemData.referTypeValue ? 'æ¯' : 'å¦' }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | åç
§ç±»å |
| | | </template> |
| | | {{ itemForm.itemData.referTypeValue }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | åç
§åç§° |
| | | </template> |
| | | {{ itemForm.itemData.referToName }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æä¸¾" name="enumTab"> |
| | | <el-form ref="form" :model="itemData" label-width="80px" style="height: 656px;"> |
| | | <el-form-item label="ä½¿ç¨æä¸¾"> |
| | | <el-switch v-model="itemData.usingDict" :disabled="true"></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="æä¸¾ç±»å"> |
| | | <el-input v-model="form.dictCode" :disabled="true"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-descriptions class="margin-top" :column="1" :size="small" border> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | ä½¿ç¨æä¸¾ |
| | | </template> |
| | | {{ itemForm.itemData.usingDict ? 'æ¯' : 'å¦' }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æä¸¾ç±»å |
| | | </template> |
| | | {{ itemForm.itemData.dictCode }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </basic-container> |
| | | </el-aside> |
| | | <originalAdd ref="originalAdd" :attribute="attribute" @refreshTable="refreshChange"></originalAdd> |
| | | </el-container> |
| | | </template> |
| | | |
| | |
| | | update, getPage, getApplyRange |
| | | } from "@/api/omd/OmdAttribute"; |
| | | |
| | | import { getDictionary } from "@/api/omd/enum"; |
| | | |
| | | export default { |
| | | name: "original", |
| | | data() { |
| | | return { |
| | | datas: [], |
| | | itemData: {}, |
| | | activeName: 'attrTab', |
| | | formAtrr: {}, |
| | | rouname: "", |
| | | referType: { |
| | | code: 'referType', |
| | | key: '', |
| | | value: '', |
| | | display: false, |
| | | title: '', |
| | | disable: true |
| | | }, |
| | | //å¼åä¸ææ¡æ°æ® |
| | | Typelist: [], |
| | | //çæ¬æ°æ® |
| | | banList: [], |
| | | // 屿§ç±»åä¸ææ¡æ°æ® |
| | | typeSelectList: [ |
| | | { |
| | | label: "ååå", |
| | | value: 0 |
| | | },], |
| | | // æ¯å¦ä¸ºç©º |
| | | nullable: [], |
| | | form: { |
| | | text: "" |
| | | }, |
| | | detailForm: { |
| | | text: "" |
| | | }, |
| | | return { |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 100 |
| | | }, |
| | | selectRow: '', |
| | | data: [ |
| | | |
| | | ], |
| | | data: [], |
| | | form:{}, |
| | | attribute: { |
| | | nullable: true |
| | | }, |
| | | option: { |
| | | height: "550px", |
| | | headerAlign: 'center', |
| | |
| | | index: true, |
| | | rowKey: 'id', |
| | | tabs: true, |
| | | stripe:true, |
| | | indexFixed: false, |
| | | menuWidth: 150, |
| | | highlightCurrentRow: true, |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | column: [{ |
| | | label: 'éæ©', |
| | | prop: 'radio', |
| | |
| | | prop: 'id', |
| | | align: 'left', |
| | | display: false, |
| | | width: 200 |
| | | width: 200, |
| | | required: true |
| | | }, { |
| | | label: '屿§åç§°', |
| | | prop: 'name', |
| | |
| | | display: false, |
| | | dicData: [{ |
| | | label: 'æ¯', |
| | | value: 0 |
| | | value: 'true' |
| | | }, { |
| | | label: 'å¦', |
| | | value: 1 |
| | | value: 'false' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | labelWidth: 132, |
| | | dicData: [{ |
| | | label: 'å¦', |
| | | value: 1 |
| | | value: 'false' |
| | | }, { |
| | | label: 'æ¯', |
| | | value: 0 |
| | | value: 'true' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | type: "textarea", |
| | | display: false |
| | | }, |
| | | ], |
| | | group: [ |
| | | { |
| | | label: '屿§é¡¹', |
| | | prop: "index", |
| | | column: [ |
| | | { |
| | | label: '屿§ç¼å·', |
| | | prop: 'id', |
| | | align: 'left', |
| | | }, |
| | | { |
| | | label: '屿§åç§°', |
| | | prop: 'name', |
| | | align: 'left', |
| | | }, |
| | | { |
| | | label: 'æ ç¾', |
| | | prop: 'hashtag', |
| | | hide: true |
| | | }, { |
| | | label: '屿§ç±»ååå
¸ç ', |
| | | prop: 'typeCode', |
| | | display: false, |
| | | value: 'attributeType' |
| | | }, |
| | | { |
| | | label: '屿§ç±»å', |
| | | prop: 'typeKey', |
| | | type: "select", |
| | | dicUrl: '/api/ubcs-omd/dict-biz/dictionary?code=attributeType', |
| | | dicType: 'String', |
| | | props: { |
| | | label: 'dictValue', |
| | | value: 'dictKey' |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "è¯·éæ©å±æ§ç±»å", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | }, |
| | | { |
| | | label: 'å
许为空', |
| | | prop: 'nullable', |
| | | type: 'switch', |
| | | hide: true, |
| | | labelWidth: 132, |
| | | dicData: [{ |
| | | label: 'å¦', |
| | | value: 1 |
| | | }, { |
| | | label: 'æ¯', |
| | | value: 0 |
| | | }] |
| | | }, |
| | | { |
| | | label: "é¿åº¦", |
| | | prop: "maxLength", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | type: "textarea" |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: 'åç
§', |
| | | column: [ |
| | | { |
| | | label: 'åç
§ç±»å«', |
| | | prop: 'referTypeCode', |
| | | display: false, |
| | | hide: true |
| | | },{ |
| | | span: 12, |
| | | label: 'åç
§ç±»å«', |
| | | prop: 'referTypeKey', |
| | | type: "select", |
| | | change: this.selectChange, |
| | | dicUrl: '/api/ubcs-omd/dict-biz/dictionary?code=referType', |
| | | dicType: 'String', |
| | | props: { |
| | | label: 'dictValue', |
| | | value: 'dictKey' |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "è¯·éæ©åç
§ç±»å«", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | prop: "selInput", |
| | | placeholder: false, |
| | | readonly: true, |
| | | display: true, |
| | | formslot: true, |
| | | }, |
| | | // { |
| | | // label: "éæ©çæ¬", |
| | | // prop: "banben", |
| | | // type: 'select', |
| | | // value: 0, |
| | | // change: this.selchange, |
| | | // display: true, |
| | | // dicData: [ |
| | | // { |
| | | // label: 'å½åçæ¬æ¬¡', |
| | | // value: 0 |
| | | // }, |
| | | // { |
| | | // label: 'ææ°çæ¬æ¬¡', |
| | | // value: 1 |
| | | // } |
| | | // ] |
| | | // }, |
| | | { |
| | | //é»è®¤è¡¨æ ¼ææ§½ |
| | | prop: "default", |
| | | span: 24, |
| | | display: false |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'æä¸¾', |
| | | column: [ |
| | | { |
| | | label: 'æ¯å¦ä½¿ç¨æä¸¾', |
| | | prop: 'isnot', |
| | | type: 'switch', |
| | | hide: true, |
| | | labelWidth: 132, |
| | | span: 8, |
| | | dicData: [{ |
| | | label: 'å¦', |
| | | value: 1 |
| | | }, { |
| | | label: 'æ¯', |
| | | value: 0 |
| | | }] |
| | | }, |
| | | { |
| | | prop: 'text', |
| | | type: 'input', |
| | | placeholder: '请è¾å
¥å
容', |
| | | hide: true, |
| | | display: false |
| | | }, |
| | | { |
| | | prop: 'enumerationSelect', |
| | | type: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | hide: true, |
| | | span: 12, |
| | | dicData: [ |
| | | { |
| | | label: 'a', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: 'b', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'c', |
| | | value: 2 |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'endesc', |
| | | type: "textarea", |
| | | labelWidth: 132, |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | applyRange: { |
| | |
| | | }, |
| | | data: [], |
| | | display: false, |
| | | }, |
| | | itemForm:{ |
| | | itemData: {}, |
| | | activeName: 'referTab', |
| | | form:{} |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | created() { |
| | | const column =this.findObject(this.option.group,"referTypeKey") |
| | | console.log(column); |
| | | |
| | | }, |
| | | methods: { |
| | | rowLinkchange(row) { |
| | | this.form.text = row.name |
| | | }, |
| | | rowchange(row) { |
| | | this.form.text = row.name |
| | | }, |
| | | //å¼åç±»åéæ© |
| | | addHandle() { |
| | | this.packageBox = true |
| | | if (this.Typelist.value == 0) { |
| | | this.packageBox = true |
| | | this.packageLinkBox = false |
| | | } else if (this.Typelist.value == 1) { |
| | | this.packageBox = false |
| | | this.packageLinkBox = true |
| | | } |
| | | }, |
| | | // å¼åä¸å¡ç±»åå¯¹è¯æ¡åæ¶ |
| | | dialoghandelfalse() { |
| | | this.packageBox = false; |
| | | this.form.text = "" |
| | | }, |
| | | //å¼åä¸å¡ç±»åå¯¹è¯æ¡ç¡®å® |
| | | dialoghandeltrue() { |
| | | this.packageBox = false |
| | | }, |
| | | // å¼å龿¥ç±»åå¯¹è¯æ¡åæ¶ |
| | | Linkdialoghandelfalse() { |
| | | this.packageLinkBox = false; |
| | | this.form.text = "" |
| | | }, |
| | | //å¼å龿¥ç±»åå¯¹è¯æ¡ç¡®å® |
| | | Linkdialoghandeltrue() { |
| | | this.packageLinkBox = false |
| | | }, |
| | | selectChange(val) { |
| | | this.referType.key = val.value |
| | | if (val.value == 'businessType'){ |
| | | this.referType.value = 'ä¸å¡ç±»å' |
| | | } |
| | | if (val.value == 'linkType'){ |
| | | this.referType.value = '龿¥ç±»å' |
| | | } |
| | | if(val.value){ |
| | | this.referType.disable = false |
| | | } |
| | | }, |
| | | selchange(val) { |
| | | this.banList = val |
| | | console.log(val); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.pageParent, this.query); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | |
| | | done(); |
| | | |
| | | addSave(){ |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = {}; |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("ç¡®å®å°éæ©æ°æ®å é¤?", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | this.onLoad(); |
| | | }); |
| | | updateSave(){ |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = this.attribute; |
| | | }, |
| | | rowSave(row, done) { |
| | | add(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | done(row) |
| | | this.onLoad() |
| | | }).catch((res) => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: res |
| | | }); |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done) { |
| | | update(row).then(() => { |
| | | this.onLoad() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "ä¿®æ¹æå!" |
| | | }); |
| | | done(row) |
| | | deleteSave(){ |
| | | remove(this.itemForm.itemData).then(res => { |
| | | this.$message.success("å 餿å"); |
| | | }) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | |
| | | }) |
| | | }, |
| | | rowClick(row) { |
| | | this.itemData = row; |
| | | this.itemForm.itemData = row; |
| | | this.selectRow = row.$index; |
| | | |
| | | this.attribute = row; |
| | | } |
| | | ,selectBtmType(){ |
| | | this.referType.display = true; |
| | |
| | | }) |
| | | } |
| | | var oid = this.data[this.selectRow].oid; |
| | | console.log(oid); |
| | | getApplyRange(oid).then(res => { |
| | | this.applyRange.data = res.data.data; |
| | | }) |
| | | console.log("success"); |
| | | this.applyRange.display = true; |
| | | }, |
| | | applyRangeClose(){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | <el-dialog title="å
æ°æ®" :visible.sync="showSubmitDialog" append-to-body @close="closeSubmitDialog" width="50%" |
| | | style="height: 115vh;"> |
| | | <!-- å
æ°æ®ç墿¹å¼¹çª --> |
| | | <el-form ref="form" :model="attribute" show-message="true" inline size="medium" label-suffix=":" |
| | | class="attributeForm" :rules="rules" @resetFields="resetAttributeForm" status-icon="true"> |
| | | <el-form-item label="屿§ç¼å·" label-width="100px" prop="id"> |
| | | <el-input v-model="attribute.id" maxlength="15" show-word-limit type="text"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="屿§åç§°" label-width="100px" prop="name"> |
| | | <el-input v-model="attribute.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="屿§ç±»å" label-width="100px" prop="typeValue"> |
| | | <el-select v-model="attribute.typeValue" placeholder="è¯·éæ©å±æ§ç±»å" @change="typeSelectChange"> |
| | | <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ç¾" label-width="100px"> |
| | | <el-input v-model="attribute.hashtag"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é»è®¤å¼" label-width="100px"> |
| | | <el-input v-model="attribute.defaultValue"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å
许为空" label-width="100px"> |
| | | <el-switch v-model="attribute.nullable" active-text="å
许" inactive-text="ä¸å
许"></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" label-width="100px" prop="maxLength"> |
| | | <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" controls-position="right"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="精度" label-width="100px" v-if="attribute.typeValue == 'VTDouble'"> |
| | | <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" @change="changeNumber"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" label-width="100px"> |
| | | <el-input v-model="attribute.description" type="text"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" stretch="true"> |
| | | <el-tab-pane label="åç
§" name="referTab"> |
| | | <el-form-item label="åç
§ç±»å" label-width="100px"> |
| | | <el-select v-model="attribute.referTypeKey" @change="referTypeSelectChange"> |
| | | <el-option v-for="item in btmRefer.referTypeList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åç
§åç§°" label-width="100px"> |
| | | <el-input v-model="attribute.referToName" @focus="openReferConfig" clearable="true" |
| | | :disabled="referToFlag" @clear="clearReferTo"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æä¸¾" name="enumTab"> |
| | | <el-form-item label="æä¸¾" label-width="100px"> |
| | | <el-input v-model="attribute.dictValue" @focus="openEnumConfig" clearable="true"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä¸¾é¡¹" label-width="100px"> |
| | | |
| | | </el-form-item> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitAttribute">ç¡®å®</el-button> |
| | | <el-button @click="cancleSubmit">åæ¶</el-button> |
| | | </div> |
| | | <!-- éæ©åç
§æ¶çå¼¹çª --> |
| | | <el-dialog title="åç
§å表" :visible.sync="btmRefer.show" append-to-body @close="closeReferDialog" width="80%" |
| | | style="height: 115vh;"> |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> |
| | | <div style="height:20px;"></div> |
| | | <avue-tree id="domain" :data="domain.data" :option="domain.treeOption" @node-click="nodeClick" |
| | | class="businessTree" style="height: 418px"> |
| | | <span class="el-tree-node__label" slot-scope="{ node, data }"> |
| | | <span> |
| | | <i class="el-icon-star-on"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" @row-click="btmReferClick"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="btmRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmBtm" size="small">ç¡®å®</el-button> |
| | | <el-button @click="cancleBtm" size="small">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- éæ©æä¸¾æ¶çå¼¹çª --> |
| | | <el-dialog title="æä¸¾å表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | style="height: 115vh;"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="enumRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmEnum" size="small">ç¡®å®</el-button> |
| | | <el-button @click="cancleEnum" size="small">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDictionary,getParentList } from '@/api/omd/enum' |
| | | import { initTree,btmPage } from '@/api/omd/btmType' |
| | | import { add} from '@/api/omd/OmdAttribute' |
| | | export default { |
| | | name: 'originalAdd', |
| | | props: { |
| | | attribute: { |
| | | type: Object |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | showSubmitDialog: false, |
| | | // é»è®¤çé¡µç¾ |
| | | activeName: 'referTab', |
| | | // 屿§ç±»åä¸ææ¡æ°æ® |
| | | typeList: [], |
| | | // åç
§ä¸ææ¡æ¯å¦å¯ç¨ |
| | | referToFlag: true, |
| | | // è¡¨åæ ¡éªè§å |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: '请è¾å
¥å±æ§ç¼å·', trigger: 'blur' }, |
| | | { pattern: /^[A-Za-z]+$/, message: '屿§ç¼å·åªè½ä¸ºè±æ', trigger: 'blur' }, |
| | | { min: 2, max: 15, message: 'é¿åº¦å¨2å°15个å符', trigger: 'blur' } |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥å±æ§åç§°', trigger: 'blur' } |
| | | ], |
| | | typeValue: [ |
| | | { required: true, message: 'è¯·éæ©å±æ§ç±»å', trigger: 'change' } |
| | | ], |
| | | maxLength: [ |
| | | { required: true, message: 'éè¦æå®é¿åº¦', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | // åç
§é¡µé¢è¡¨æ ¼é
ç½® |
| | | btmRefer: { |
| | | show: false, |
| | | btmPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 100 |
| | | }, |
| | | option: { |
| | | height: 405, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | menu: false, |
| | | border: true, |
| | | reserveSelection: true, |
| | | searchMenuSpan: 32, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }] |
| | | }, |
| | | // åç
§é¡µé¢è¡¨æ ¼æ°æ® |
| | | data: [], |
| | | selectRow: '', |
| | | selectItem: {}, |
| | | referTypeList: [] |
| | | }, |
| | | // æä¸¾åç
§è¡¨æ ¼é
ç½® |
| | | enumRefer: { |
| | | show: false, |
| | | enumPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 100 |
| | | }, |
| | | option: { |
| | | height: 360, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | selection: true, |
| | | menu: false, |
| | | border: true, |
| | | reserveSelection: true, |
| | | searchMenuSpan: 32, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [{ |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | label: 'æä¸¾ä»£å·', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }, { |
| | | label: 'æä¸¾åç§°', |
| | | prop: 'label', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }] |
| | | }, |
| | | // æä¸¾åç
§è¡¨æ ¼æ°æ® |
| | | data: [], |
| | | enumDictionary: [], |
| | | // éå®è¡ |
| | | selectRow: '', |
| | | selectItem: {} |
| | | }, |
| | | domain: { |
| | | data: [], |
| | | treeOption: { |
| | | defaultExpandAll: true, |
| | | title: 'é¢åæå¡æ ', |
| | | props: { |
| | | labelText: '', |
| | | label: 'name', |
| | | value: 'oid', |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.initAttributeTypeList(); |
| | | this.initAttributeReferTypeList(); |
| | | }, |
| | | methods: { |
| | | closeSubmitDialog() { |
| | | this.resetAttributeForm(); |
| | | this.showSubmitDialog = false; |
| | | }, |
| | | resetAttributeForm() { |
| | | this.attribute = { |
| | | nullable: true, |
| | | referTypeKey: '', |
| | | }; |
| | | this.referToFlag = true; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | submitAttribute() { |
| | | add(this.attribute).then(res => { |
| | | this.$message.success("ä¿åæå"); |
| | | this.showSubmitDialog = false; |
| | | this.attribute = {}; |
| | | this.$emit('refreshTable'); |
| | | }); |
| | | |
| | | }, |
| | | cancleSubmit() { |
| | | this.closeSubmitDialog(); |
| | | }, |
| | | closeEnumDialog() { |
| | | this.cancleEnum(); |
| | | }, |
| | | closeReferDialog() { |
| | | this.cancleBtm(); |
| | | }, |
| | | confirmBtm() { |
| | | this.attribute.referToId = this.btmRefer.selectItem.oid; |
| | | this.attribute.referToName = this.btmRefer.selectItem.name; |
| | | this.btmRefer.show = false; |
| | | }, |
| | | cancleBtm() { |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.show = false; |
| | | this.btmRefer.selectRow = ''; |
| | | }, |
| | | confirmEnum() { |
| | | this.attribute.usingDict = true; |
| | | this.attribute.dictCode = this.enumRefer.selectItem.name; |
| | | this.attribute.dictValue = this.enumRefer.selectItem.label; |
| | | this.enumRefer.show = false; |
| | | }, |
| | | cancleEnum() { |
| | | this.enumRefer.selectItem = {}; |
| | | this.enumRefer.show = false; |
| | | this.enumRefer.selectRow = ''; |
| | | }, |
| | | // åç
§åç§°è¾å
¥æ¡è·åç¦ç¹æ¶çäºä»¶ |
| | | openReferConfig() { |
| | | if (!this.attribute.referTypeKey) { |
| | | this.$message.warning('请å
éæ©åç
§çç±»å'); |
| | | this.referToFlag = true; |
| | | return; |
| | | } |
| | | this.domain.data = []; |
| | | this.btmRefer.data = []; |
| | | initTree().then(res => { |
| | | this.domain.data = res.data.data; |
| | | }) |
| | | this.btmRefer.show = true; |
| | | |
| | | }, |
| | | // åç
§ç±»åæ çç¹å»äºä»¶ |
| | | nodeClick(data) { |
| | | // åºåä¸å¡ç±»åçæ¥è¯¢å龿¥ç±»åçæ¥è¯¢ |
| | | if(this.attribute.referTypeKey == 'btmType'){ |
| | | btmPage(this.btmRefer.btmPage.currentPage,this.btmRefer.btmPage.pageSize,{domain:data.id}).then(res => { |
| | | this.btmRefer.data = res.data.data.records; |
| | | this.btmRefer.btmPage.total = res.data.data.total; |
| | | }) |
| | | } |
| | | if(this.attribute.referTypeKey == 'linkType'){ |
| | | |
| | | } |
| | | }, |
| | | // æä¸¾ç±»åè¾å
¥æ¡è·å¾ç¦ç¹æ¶çäºä»¶ |
| | | openEnumConfig() { |
| | | getParentList(this.enumRefer.enumPage.currentPage,this.enumRefer.enumPage.pageSize).then(res => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }) |
| | | this.enumRefer.show = true; |
| | | }, |
| | | // 屿§ç±»å䏿æ¡éæ©äºä»¶ |
| | | typeSelectChange(value) { |
| | | if (value == 'VTString') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | } else if (value == 'VTInteger') { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | } else if (value == 'VTBoolean') { |
| | | this.$set(this.attribute,"maxLength",5) |
| | | } else if (value == 'VTDouble') { |
| | | this.$set(this.attribute,"maxLength",26) |
| | | this.$set(this.attribute,"precision",8) |
| | | } else if (value == 'VTLong') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | } else if (value == 'VTDate' || value == 'VTTime' || value == 'VTDateTime') { |
| | | this.$set(this.attribute,"maxLength",6) |
| | | } else { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | } |
| | | this.attribute.typeCode = 'attributeType'; |
| | | this.attribute.typeKey = value; |
| | | }, |
| | | referTypeSelectChange(value) { |
| | | this.attribute.referTypeCode = 'attributeReferType'; |
| | | this.attribute.referTypeKey = value; |
| | | this.referToFlag = false; |
| | | }, |
| | | initAttributeTypeList() { |
| | | getDictionary({ code: 'attributeType' }).then(res => { |
| | | res.data.data.forEach(element => { |
| | | this.typeList.push( |
| | | { value: element.itemValue, label: element.itemName } |
| | | ) |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.error('屿§ç±»å没æ¾å°æè
æªå®ä¹') |
| | | }) |
| | | }, |
| | | initAttributeReferTypeList(){ |
| | | getDictionary({ code: 'attributeReferType' }).then(res => { |
| | | res.data.data.forEach(element => { |
| | | this.btmRefer.referTypeList.push( |
| | | { value: element.itemValue, label: element.itemName } |
| | | ) |
| | | }); |
| | | }).catch(() => { |
| | | this.$message.error('åç
§ç±»å没æ¾å°æè
æªå®ä¹') |
| | | }) |
| | | }, |
| | | btmReferClick(row){ |
| | | this.btmRefer.selectItem = row; |
| | | this.btmRefer.selectRow = row.$index; |
| | | }, |
| | | enumReferClick(row){ |
| | | this.enumRefer.selectItem = row; |
| | | this.enumRefer.selectRow = row.$index; |
| | | }, |
| | | // åç
§åç§°ç¹å»æ¸
餿°æ® |
| | | clearReferTo(){ |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.selectRow = ''; |
| | | }, |
| | | handleClick(tab){ |
| | | // å 为åªè½åç
§åæä¸¾äºéä¸ãæä»¥å¨åæ¢çæ¶åæå±æ§ç»æ¸
空ã |
| | | this.$delete(this.attribute,'referTypeCode'); |
| | | this.$delete(this.attribute,'referTypeKey'); |
| | | this.$delete(this.attribute,'referTypeValue'); |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | this.$delete(this.attribute,'dictCode'); |
| | | this.$delete(this.attribute,'dictKey'); |
| | | this.$delete(this.attribute,'dictValue'); |
| | | this.$delete(this.attribute,'usingDict'); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .btmTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .enumTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .attributeForm>.el-form-item>.el-form-item__content>.el-input>.el-input__inner { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | // target: 'http://localhost:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://192.168.1.51:37000/', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | // target: 'https://saber.bladex.vip/api', |
| | | ws: true, |
| | |
| | | * nacos dev å°å |
| | | */ |
| | | //String NACOS_DEV_ADDR = "dev.vci-tech.com:38848"; |
| | | String NACOS_DEV_ADDR = "localhost:8848"; |
| | | String NACOS_DEV_ADDR = "127.0.0.1:8848"; |
| | | |
| | | /** |
| | | * nacos prod å°å |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * è®°å½éæå±æ°æ®ç³è¯·id |
| | |
| | | /*** |
| | | * éå¢ç¼ç |
| | | */ |
| | | private String groupCode; |
| | | /*** |
| | | * é误æ è¯ç |
| | | */ |
| | | |
| | | private String code; |
| | | |
| | | /*** |
| | |
| | | * æ¶æ¯ |
| | | */ |
| | | private String msg; |
| | | |
| | | /** |
| | | * ç³è¯·åç±»å1:ç³è¯·ï¼2ï¼æ´æ¹ |
| | | */ |
| | | private String operationType; |
| | | |
| | | public String getCode() { |
| | | return code; |
| | |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getOperationType() { |
| | | return operationType; |
| | | } |
| | | |
| | | public void setOperationType(String operationType) { |
| | | this.operationType = operationType; |
| | | } |
| | | |
| | | public String getGroupCode() { |
| | | return groupCode; |
| | | } |
| | | |
| | | public void setGroupCode(String groupCode) { |
| | | this.groupCode = groupCode; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingPreApplyCodeFormVO{" + |
| | | "code='" + code + '\'' + |
| | | return "DockingPreApplyFormDTO{" + |
| | | "groupCode='" + groupCode + '\'' + |
| | | ", code='" + code + '\'' + |
| | | ", content='" + content + '\'' + |
| | | ", dataOid='" + dataOid + '\'' + |
| | | ", dataBtmName='" + dataBtmName + '\'' + |
| | | ", msg='" + msg + '\'' + |
| | | ", operationType='" + operationType + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /*** |
| | | * è®°å½éå¢åç±»ä¿¡æ¯ |
| | | * @author xiejun |
| | |
| | | * ç¶çº§èç¹ |
| | | */ |
| | | private String pid; |
| | | /** |
| | | * éå¢åç±»å
å«ç模åè§å¾ |
| | | */ |
| | | List<DockingPreViewModelDTO> dockingPreViewModelDTOList; |
| | | |
| | | public String getClassName() { |
| | | return className; |
| | |
| | | this.pid = pid; |
| | | } |
| | | |
| | | public List<DockingPreViewModelDTO> getDockingPreViewModelDTOList() { |
| | | return dockingPreViewModelDTOList; |
| | | } |
| | | |
| | | public void setDockingPreViewModelDTOList(List<DockingPreViewModelDTO> dockingPreViewModelDTOList) { |
| | | this.dockingPreViewModelDTOList = dockingPreViewModelDTOList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingPreClassifyDTO{" + |
| | |
| | | ", nodeLink='" + nodeLink + '\'' + |
| | | ", getNodeLinkName='" + getNodeLinkName + '\'' + |
| | | ", pid='" + pid + '\'' + |
| | | ", dockingPreViewModelDTOList=" + dockingPreViewModelDTOList + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreMetaAttrVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è®°å½éæéå¢åç±»è§å¾ä¿¡æ¯ |
| | |
| | | * æ°æ®xinx |
| | | */ |
| | | private String impactList; |
| | | |
| | | /*** |
| | | * 模åè§å¾å
å«ç屿§ |
| | | */ |
| | | private List<DockingPreMetaAttrDTO> dockingPreMetaAttrDTOList; |
| | | |
| | | public String getViewName() { |
| | | return viewName; |
| | |
| | | this.impactList = impactList; |
| | | } |
| | | |
| | | public List<DockingPreMetaAttrDTO> getDockingPreMetaAttrDTOList() { |
| | | return dockingPreMetaAttrDTOList; |
| | | } |
| | | |
| | | public void setDockingPreMetaAttrDTOList(List<DockingPreMetaAttrDTO> dockingPreMetaAttrDTOList) { |
| | | this.dockingPreMetaAttrDTOList = dockingPreMetaAttrDTOList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingPreViewModelVO{" + |
| | | return "DockingPreViewModelDTO{" + |
| | | "viewName='" + viewName + '\'' + |
| | | ", sourceClassifyId='" + sourceClassifyId + '\'' + |
| | | ", impactList='" + impactList + '\'' + |
| | | ", dockingPreMetaAttrDTOList=" + dockingPreMetaAttrDTOList + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | @ApiModel(value = "DockingPreApplyForm", description = "éå¢ç¼ç ç³è¯·åè®°å½å¯¹è±¡") |
| | | @EqualsAndHashCode |
| | | public class DockingPreApplyForm extends BaseModel { |
| | | |
| | | /*** |
| | | * éå¢ç¼ç |
| | | */ |
| | | @ApiModelProperty(value = "éå¢ç¼ç ") |
| | | private String groupCode; |
| | | /*** |
| | | * é误æ è¯ç |
| | | */ |
| | | @ApiModelProperty(value = "é误æ è¯ç ") |
| | | private String code; |
| | | |
| | | /*** |
| | |
| | | */ |
| | | @ApiModelProperty(value = "æ¶æ¯") |
| | | private String msg; |
| | | /** |
| | | * ç³è¯·åç±»å1:ç³è¯·ï¼2ï¼æ´æ¹ |
| | | */ |
| | | @ApiModelProperty(value = "æ¶æ¯") |
| | | private String operationType; |
| | | } |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.xml.soap.SAAJResult; |
| | | |
| | | /** |
| | | * è®°å½éæå±æ°æ®ç³è¯·id |
| | |
| | | /*** |
| | | * éå¢ç¼ç |
| | | */ |
| | | private String groupCode; |
| | | /*** |
| | | * é误æ è¯ç |
| | | */ |
| | | private String code; |
| | | |
| | | /*** |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è®°å½éæéå¢åç±»ä¿¡æ¯ |
| | | * @author xiejun |
| | |
| | | * ç¶çº§èç¹ |
| | | */ |
| | | private String pid; |
| | | /*** |
| | | * å类模åè§å¾ |
| | | */ |
| | | private List<DockingPreViewModelVO> dockingPreViewModelVOList; |
| | | |
| | | public String getClassName() { |
| | | return className; |
| | |
| | | this.pid = pid; |
| | | } |
| | | |
| | | public List<DockingPreViewModelVO> getDockingPreViewModelVOList() { |
| | | return dockingPreViewModelVOList; |
| | | } |
| | | |
| | | public void setDockingPreViewModelVOList(List<DockingPreViewModelVO> dockingPreViewModelVOList) { |
| | | this.dockingPreViewModelVOList = dockingPreViewModelVOList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingPreClassifyDTO{" + |
| | | return "DockingPreClassifyVO{" + |
| | | "className='" + className + '\'' + |
| | | ", nodeLink='" + nodeLink + '\'' + |
| | | ", getNodeLinkName='" + getNodeLinkName + '\'' + |
| | | ", pid='" + pid + '\'' + |
| | | ", dockingPreViewModelVOList=" + dockingPreViewModelVOList + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è®°å½éæéå¢åç±»è§å¾ä¿¡æ¯ |
| | | * @author xiejun |
| | |
| | | * æ°æ®xinx |
| | | */ |
| | | private String impactList; |
| | | |
| | | |
| | | /*** |
| | | * 模åè§å¾å
å«ç屿§ |
| | | */ |
| | | private List<DockingPreMetaAttrVO> dockingPreMetaAttrVOList; |
| | | public String getViewName() { |
| | | return viewName; |
| | | } |
| | |
| | | this.impactList = impactList; |
| | | } |
| | | |
| | | public List<DockingPreMetaAttrVO> getDockingPreMetaAttrVOList() { |
| | | return dockingPreMetaAttrVOList; |
| | | } |
| | | |
| | | public void setDockingPreMetaAttrVOList(List<DockingPreMetaAttrVO> dockingPreMetaAttrVOList) { |
| | | this.dockingPreMetaAttrVOList = dockingPreMetaAttrVOList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingPreViewModelVO{" + |
| | | "viewName='" + viewName + '\'' + |
| | | ", sourceClassifyId='" + sourceClassifyId + '\'' + |
| | | ", impactList='" + impactList + '\'' + |
| | | ", dockingPreMetaAttrVOList=" + dockingPreMetaAttrVOList + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | |
| | | @XStreamAlias("classify") |
| | | public class ClassifyVO { |
| | | /** |
| | | * åç±»id |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String id; |
| | | /*** |
| | | * åç±»åç§° |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String name; |
| | | /*** |
| | | * ç¶èç¹id |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String pid; |
| | | /*** |
| | | * åç±»ä»£å· |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String classCode; |
| | | /*** |
| | | * æè¿° |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String description; |
| | | /*** |
| | | * åç±»é¾æ¥è·¯å¾ |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String fullPathName; |
| | | /*** |
| | | * åç±»ç¶æ |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String lcStatus; |
| | | /*** |
| | | * è§åid |
| | | */ |
| | | @XStreamAsAttribute |
| | | private String codeRuleId; |
| | | |
| | | /*** |
| | | * æ¯å¦ä¸ºå¶åèç¹ |
| | | */ |
| | | @XStreamAsAttribute |
| | | private boolean isLeaf; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPid() { |
| | | return pid; |
| | | } |
| | | |
| | | public void setPid(String pid) { |
| | | this.pid = pid; |
| | | } |
| | | |
| | | public String getClassCode() { |
| | | return classCode; |
| | | } |
| | | |
| | | public void setClassCode(String classCode) { |
| | | this.classCode = classCode; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getFullPathName() { |
| | | return fullPathName; |
| | | } |
| | | |
| | | public void setFullPathName(String fullPathName) { |
| | | this.fullPathName = fullPathName; |
| | | } |
| | | |
| | | public String getLcStatus() { |
| | | return lcStatus; |
| | | } |
| | | |
| | | public void setLcStatus(String lcStatus) { |
| | | this.lcStatus = lcStatus; |
| | | } |
| | | |
| | | public String getCodeRuleId() { |
| | | return codeRuleId; |
| | | } |
| | | |
| | | public void setCodeRuleId(String codeRuleId) { |
| | | this.codeRuleId = codeRuleId; |
| | | } |
| | | |
| | | public boolean isLeaf() { |
| | | return isLeaf; |
| | | } |
| | | |
| | | public void setLeaf(boolean leaf) { |
| | | isLeaf = leaf; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ClassifyVO{" + |
| | | "id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", pid='" + pid + '\'' + |
| | | ", classCode='" + classCode + '\'' + |
| | | ", description='" + description + '\'' + |
| | | ", fullPathName='" + fullPathName + '\'' + |
| | | ", lcStatus='" + lcStatus + '\'' + |
| | | ", codeRuleId='" + codeRuleId + '\'' + |
| | | ", isLeaf=" + isLeaf + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | public class CodeRuleVO { |
| | | // private String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | @XStreamAlias("library ") |
| | | public class LibraryVO { |
| | | @XStreamAsAttribute |
| | | private String id; |
| | | @XStreamAsAttribute |
| | | private String name; |
| | | @XStreamImplicit |
| | | private List<ClassifyVO>classify; |
| | | |
| | | private List<CodeRuleVO> coderule; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public List<ClassifyVO> getClassify() { |
| | | return classify; |
| | | } |
| | | |
| | | public void setClassify(List<ClassifyVO> classify) { |
| | | this.classify = classify; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "LibraryVO{" + |
| | | "id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", classify=" + classify + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | public class QueryClassifyVO { |
| | | /*** |
| | | * |
| | | */ |
| | | private QueryData data; |
| | | |
| | | public QueryData getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(QueryData data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "QueryClassifyVO{" + |
| | | "data=" + data + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.vci.ubcs.code.vo.webserviceModel.apply.UserVO; |
| | | |
| | | @XStreamAlias("data") |
| | | public class QueryData { |
| | | @XStreamAsAttribute |
| | | private String systemId; |
| | | private UserVO user; |
| | | private QueryLibraryVO library ; |
| | | public QueryLibraryVO getLibrary() { |
| | | return library; |
| | | } |
| | | |
| | | public void setLibrary(QueryLibraryVO library) { |
| | | this.library = library; |
| | | } |
| | | |
| | | public String getSystemId() { |
| | | return systemId; |
| | | } |
| | | |
| | | public void setSystemId(String systemId) { |
| | | this.systemId = systemId; |
| | | } |
| | | |
| | | public UserVO getUser() { |
| | | return user; |
| | | } |
| | | |
| | | public void setUser(UserVO user) { |
| | | this.user = user; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "QueryData{" + |
| | | "systemId='" + systemId + '\'' + |
| | | ", library=" + library + |
| | | '}'; |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | @XStreamAlias("library") |
| | | public class QueryLibraryVO { |
| | | @XStreamAsAttribute |
| | | private String id; |
| | | @XStreamImplicit |
| | | private List<String> classifyid; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public List<String> getClassifyid() { |
| | | return classifyid; |
| | | } |
| | | |
| | | public void setClassifyid(List<String> classifyid) { |
| | | this.classifyid = classifyid; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "LibraryVO{" + |
| | | "id='" + id + '\'' + |
| | | ", classifyid=" + classifyid + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | public class ResultClassifyVO { |
| | | |
| | | private ResultData resultData; |
| | | |
| | | public ResultData getResultData() { |
| | | return resultData; |
| | | } |
| | | |
| | | public void setResultData(ResultData resultData) { |
| | | this.resultData = resultData; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ResultClassifyVO{" + |
| | | "resultData=" + resultData + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.coderule; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | |
| | | @XStreamAlias("data") |
| | | public class ResultData { |
| | | @XStreamAlias("errorid") |
| | | private String errorid; |
| | | @XStreamAlias("msg") |
| | | private String msg; |
| | | private LibraryVO library ; |
| | | |
| | | public LibraryVO getLibrary() { |
| | | return library; |
| | | } |
| | | |
| | | public void setLibrary(LibraryVO library) { |
| | | this.library = library; |
| | | } |
| | | |
| | | public String getErrorid() { |
| | | return errorid; |
| | | } |
| | | |
| | | public void setErrorid(String errorid) { |
| | | this.errorid = errorid; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ResultData{" + |
| | | "code='" + errorid + '\'' + |
| | | ", msg='" + msg + '\'' + |
| | | ", library=" + library + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.List; |
| | | |
| | | /*** |
| | | * éå¢ç³è¯·æ¥å£åæ°ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class DockingGroupDataVO { |
| | | |
| | | /*** |
| | | * ç³»ç»æ è¯ |
| | | */ |
| | | |
| | | private String sysName; |
| | | /** |
| | | * ä¸å¡æ°æ® |
| | | */ |
| | | private List<DockingMainData> mainData; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingGroupDataVO{" + |
| | | "sysName='" + sysName + '\'' + |
| | | ", mainData=" + mainData + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DockingMainData { |
| | | /** |
| | | * ç³è¯·åå· |
| | | */ |
| | | private String applyId; |
| | | /*** |
| | | * å¯çº§ |
| | | */ |
| | | private String secretLevel; |
| | | |
| | | /*** |
| | | * ç³è¯·åä½ä»£ç ï¼å¦131460ï¼ |
| | | */ |
| | | private String applyEntId; |
| | | /*** |
| | | * ç³è¯·äººåç¼ç ï¼ç¨æ·åï¼å¦85645824ï¼ |
| | | */ |
| | | private String createBy; |
| | | /*** |
| | | * åç±»åç§° |
| | | */ |
| | | private String className; |
| | | /*** |
| | | * 模åè§å¾ä¿¡æ¯ |
| | | */ |
| | | private List<DockingViewVO> viewInfos; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingMainData{" + |
| | | "applyId='" + applyId + '\'' + |
| | | ", secretLevel='" + secretLevel + '\'' + |
| | | ", applyEntId='" + applyEntId + '\'' + |
| | | ", createBy='" + createBy + '\'' + |
| | | ", className='" + className + '\'' + |
| | | ", viewInfos=" + viewInfos + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /*** |
| | | * 模åè§å¾ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class DockingViewVO { |
| | | /** |
| | | * 模åè§å¾åç§° |
| | | */ |
| | | private String viewName; |
| | | /** |
| | | * 屿§å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | private List<Map<String,Object>> viewValue; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "DockingViewVO{" + |
| | | "viewName='" + viewName + '\'' + |
| | | ", viewValue=" + viewValue + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ResultDataVO<T> { |
| | | /*** |
| | | * æ¶æ¯ |
| | | */ |
| | | private String code; |
| | | |
| | | private String msg; |
| | | |
| | | private T data; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group.result; |
| | | |
| | | |
| | | public class DataObjectVO { |
| | | |
| | | private String msg; |
| | | |
| | | private String code; |
| | | |
| | | private DataVO data; |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public DataVO getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(DataVO data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group.result; |
| | | |
| | | public class DataVO { |
| | | |
| | | private String applyId; |
| | | private String customCoding; |
| | | private String formState; |
| | | public String getApplyId() { |
| | | return applyId; |
| | | } |
| | | public void setApplyId(String applyId) { |
| | | this.applyId = applyId; |
| | | } |
| | | public String getCustomCoding() { |
| | | return customCoding; |
| | | } |
| | | public void setCustomCoding(String customCoding) { |
| | | this.customCoding = customCoding; |
| | | } |
| | | public String getFormState() { |
| | | return formState; |
| | | } |
| | | public void setFormState(String formState) { |
| | | this.formState = formState; |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.vo.webserviceModel.group.result; |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | public class ResultDataObject { |
| | | /** |
| | | * ç¶æç 1ï¼æåï¼2ï¼å¤±è´¥ |
| | | */ |
| | | private String code; |
| | | /** |
| | | * æ¥å£è°ç¨ç»æ æåï¼å¤±è´¥åå |
| | | */ |
| | | private String msg; |
| | | /*** |
| | | * æ°æ®å¯¹è±¡ |
| | | */ |
| | | private List<DataObjectVO> data; |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public List<DataObjectVO> getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(List<DataObjectVO> data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ResultDataObject{" + |
| | | "code='" + code + '\'' + |
| | | ", msg='" + msg + '\'' + |
| | | ", data=" + data + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | */ |
| | | @ApiModelProperty(value = "主é®") |
| | | @NotNull |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»ååç§° |
| | | */ |
| | | private String btmname; |
| | | private String btmName; |
| | | |
| | | /** |
| | | * æ¥æè
|
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId |
| | | private String oid; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class MdmBtmTypeConstant { |
| | | |
| | | |
| | | /** |
| | | * ç¶æ |
| | | */ |
| | | public static final String CODE_STATUS_FILED = "lcstatus"; |
| | | |
| | | /** |
| | | * éå¢ç çåæ®µ |
| | | */ |
| | | public static final String CODE_GROUP_FIELD = "groupcode"; |
| | | |
| | | /** |
| | | * åç±»ç主é®å段 |
| | | */ |
| | | public static final String CODE_CLASSIFY_OID_FIELD = "codeclsfid"; |
| | | /** |
| | | * 主é¢åºåç±» |
| | | */ |
| | |
| | | public static final String DOCKING_PRE_JINTEGMAPCONFIG = "jintegmapconifg"; |
| | | |
| | | /** |
| | | * éæå±æ§æ å°å
³ç³»ä¸å¡ç±»å |
| | | * éæéå¢åç±»ä¸å¡ç±»å |
| | | */ |
| | | public static final String DOCKING_PRE_JCLASS = "jclass"; |
| | | /** |
| | | * éæå±æ§æ å°å
³ç³»ä¸å¡ç±»å |
| | | * éæé墿¨¡å屿§ä¸å¡ç±»å |
| | | */ |
| | | public static final String DOCKING_PRE_JMETAATRR = "jmetaattr"; |
| | | |
| | | /** |
| | | * éæå±æ§æ å°å
³ç³»ä¸å¡ç±»å |
| | | * éæå±æ§åå¼èå´å
³ç³»ä¸å¡ç±»å |
| | | */ |
| | | public static final String DOCKING_PRE_JRANGE = "jrange"; |
| | | |
| | | |
| | | /** |
| | | * éæéå¢ç³è¯·åä¸å¡ç±»å |
| | | */ |
| | | public static final String DOCKING_PRE_JAPPLYFORM = "japplyform"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * éæé墿¨¡å屿§ä¸å¡ç±»å |
| | | */ |
| | | public static final String DOCKING_PRE_JVIEWMODEL = "jviewmodel"; |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.entity.DockingPreApplyForm; |
| | | import com.vci.ubcs.code.feign.IMdmInterJtClient; |
| | | import com.vci.ubcs.code.service.IDockingPreApplyFormService; |
| | | import com.vci.ubcs.code.service.IDockingPreAttrMappingService; |
| | | import com.vci.ubcs.code.service.IDockingPreAttrRangeService; |
| | | import com.vci.ubcs.code.service.IDockingPreClassifyService; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreApplyFormVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrRangeVO; |
| | | import com.vci.ubcs.code.wrapper.DockingPreApplyFormWrapper; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("ubcs-code/DockingPreApplyCode") |
| | | @RequestMapping("/DockingPreApplyCode") |
| | | @Api(value = "éå¢å±æ§æ å°é
ç½®", tags = "éå¢å±æ§æ å°é
ç½®æ¥å£") |
| | | public class DockingPreApplyCodeController { |
| | | /** |
| | |
| | | |
| | | private final IDockingPreAttrRangeService dockingPreAttrRangeService; |
| | | |
| | | /*** |
| | | * åç±»å±æ§æä¸¾èå´æå¡ |
| | | */ |
| | | |
| | | private final IDockingPreClassifyService dockingPreClassifyService; |
| | | |
| | | /*** |
| | | * 屿§æä¸¾èå´æå¡ |
| | | */ |
| | | |
| | | private final IDockingPreApplyFormService dockingPreApplyFormService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»æ°æ®ç¼ç oidè·åéå¢å±æ§æ å°ä¿¡æ¯ |
| | | * @param codeClassifyId ä¸»é® |
| | |
| | | */ |
| | | @GetMapping("/gridAttrMapping") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "å类主é®è·åä¸é墿¨¡å屿§æ å°å
³ç³»", notes = "ä¼ å
¥codeClassifyId") |
| | | public R getDockingAttrMappingsByCodeClassId(String codeClassifyId){ |
| | | List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList=dockingPreAttrMappingService.getdockingAttrMappingsByCodeclassId(codeClassifyId); |
| | | @ApiOperation(value = "å类主é®è·åä¸é墿¨¡å屿§æ å°å
³ç³»", notes = "ä¼ å
¥ä¸»æ°æ®:codeClassifyId,éå¢åç±»:sourceClassifyId") |
| | | public R getDockingAttrMappingsByCodeClassId(String codeClassifyId,String sourceClassifyId){ |
| | | List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList=dockingPreAttrMappingService.getDockingAttrMappingsByCodeClassifyId(codeClassifyId,sourceClassifyId); |
| | | return R.data(dockingPreAttrMappingVOList); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * ç³è¯·åæ¥è¯¢ èªå®ä¹å页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥dockingPreApplyForm") |
| | | public R<IPage<DockingPreApplyFormVO>> page(DockingPreApplyForm dockingPreApplyForm, Query query) { |
| | | IPage<DockingPreApplyForm> pages = dockingPreApplyFormService.page(Condition.getPage(query), Condition.getQueryWrapper(dockingPreApplyForm)); |
| | | return R.data(DockingPreApplyFormWrapper.build().pageVO(pages)); |
| | | } |
| | | /** |
| | | * ä¿å屿§æ å°é
ç½®ç»ä»¶ |
| | | * @param dockingPreAttrMappingVOList 屿§æ å°é
ç½®æ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PostMapping( "/batchAddSave") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "ä¿å屿§æ å°é
ç½®", notes = "dockingPreAttrMappingVOList") |
| | | public R batchSave(@Valid @RequestBody List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList){ |
| | | List<DockingPreAttrMappingVO> dockingPreAttrRangeVOS=new ArrayList<>(); |
| | | try { |
| | |
| | | return R.data(dockingPreAttrRangeVOS); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åç
§æ éå¢åç±»ï¼æ¯å¦å
å«å±æ§ï¼ |
| | | * @param treeQueryObject æ å½¢æ¥è¯¢å¯¹è±¡ conditionMap åä¸ codeclsfid=ä¸»æ°æ®çåç±»oid |
| | | * @return 主é¢åºåç±»æ¾ç¤ºæ |
| | | */ |
| | | @GetMapping("/referTree") |
| | | public List<Tree> referTree(@RequestBody TreeQueryObject treeQueryObject) { |
| | | return dockingPreClassifyService.treeCompanyGroupClassify(treeQueryObject); |
| | | } |
| | | |
| | | /*** |
| | | * ç³è¯·éå¢ç¼ç |
| | | * @return |
| | | */ |
| | | @PostMapping( "/applyGroupCode") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "éå¢ç ç³è¯·", notes = "dockingPreAttrMappingVOList") |
| | | public R applyGroupCode(String oids,String btmName){ |
| | | List<BaseModelVO> BaseModelVOs=new ArrayList<>(); |
| | | try { |
| | | return dockingPreAttrMappingService.applyGroupCode(oids,btmName); |
| | | }catch (Throwable e){ |
| | | return R.fail("éå¢ç ç³è¯·å¤±è´¥ï¼"+e.getMessage()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.feign; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.DockingGroupDataVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.result.ResultDataObject; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * ä¸éå¢ç³»ç»éæçè°ç¨å¨ |
| | | * @author xiejun |
| | | * @date 2023-5-24 |
| | | */ |
| | | @FeignClient(name = "groupCOdeIntegration", |
| | | url = "${docking.apply.jtInterUrl:http://116.205.176.185:8099}", |
| | | path = "") |
| | | public interface IMdmInterJtClient { |
| | | |
| | | /** |
| | | * mdmè°ç¨éå¢mdmç³è¯·éå¢ç¼ç |
| | | * @param dockingGroupDataVO AO/TOçä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PostMapping("/externalMainData/receiveAddApply") |
| | | ResultDataObject receiveAddApply(@NotNull @RequestBody DockingGroupDataVO dockingGroupDataVO); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.feign; |
| | | |
| | | public class MdmInterJtClient { |
| | | } |
| | |
| | | package com.vci.ubcs.code.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.entity.DockingPreClassify; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface DockingPreClassifyMapper extends BaseMapper<DockingPreClassify> { |
| | | |
| | | |
| | | /** |
| | | * æ¥æ¾æ å½¢ç»æ |
| | | * |
| | | * @param oid åç±»çä¸»é® |
| | | * @return æ°æ®éå |
| | | */ |
| | | List<DockingPreClassify> selectCompanyGroupClassifyVOByTree(@Param("oid") String oid); |
| | | |
| | | |
| | | /** |
| | | * æ ¡éªæ¯å¦å
å«åèç¹ |
| | | * |
| | | * @param oid åç±»çä¸»é® |
| | | * @return true 表示å
å« |
| | | */ |
| | | Boolean checkHasChild(@Param("oid") String oid); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrMapping; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @param codeClassifyId |
| | | * @return |
| | | */ |
| | | List<DockingPreAttrMappingVO> getdockingAttrMappingsByCodeclassId(String codeClassifyId); |
| | | List<DockingPreAttrMappingVO> getDockingAttrMappingsByCodeClassifyId(String codeClassifyId,String sourceClassifyId); |
| | | |
| | | /** |
| | | * ä½¿ç¨æ¥è¯¢å°è£
卿¥æ¥è¯¢ |
| | |
| | | * @return æ§è¡ç»æï¼success为true表示æåï¼msgæ¯å¤±è´¥çæç¤ºä¿¡æ¯ï¼objæ¯æ·»å 宿åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public List<DockingPreAttrMappingVO> batchAddSave(List<DockingPreAttrMappingVO> dockingPreAttrMappingDTOS)throws Exception; |
| | | |
| | | /*** |
| | | * ä¸»æ°æ®åéå¢ç³è¯·ç¼ç |
| | | * @param oids |
| | | * @param btmName |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public R applyGroupCode(String oids, String btmName)throws Throwable; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.entity.DockingPreClassify; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | |
| | | import java.util.List; |
| | | |
| | | /*** |
| | | * éå¢åç±»æå¡ |
| | |
| | | * @date 2022-05-23 |
| | | */ |
| | | public interface IDockingPreClassifyService extends IService<DockingPreClassify> { |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸»é¢åºåç±» æ |
| | | * @param treeQueryObject æ æ¥è¯¢å¯¹è±¡ |
| | | * @return 主é¢åºåç±» æ¾ç¤ºæ |
| | | */ |
| | | List<Tree> treeCompanyGroupClassify(TreeQueryObject treeQueryObject); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.entity.DockingPreMetaAttr; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreMetaAttrVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | |
| | | public List<DockingPreMetaAttr> selectByWrapper(Wrapper wrapper); |
| | | /*** |
| | | * æ ¹æ®viewModelæ¥è¯¢æ¨¡åè§å¾å±æ§ |
| | | */ |
| | | List<DockingPreMetaAttrVO> selectDockingPreMetaAttrByViewModelId(String viewModelId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.entity.DockingPreViewModel; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreViewModelVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /*** |
| | | * éå¢å类模åæå¡ |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | public interface IDockingPreViewModelService extends IService<DockingPreViewModel> { |
| | | /** |
| | | * æ ¹æ®åç±»idæ¥è¯¢åç±»è§å¾ |
| | | * @param classifyId éå¢åç±»id |
| | | * @param isContainAttr æ¯å¦æ¥è¯¢å±æ§ï¼trueï¼ æ¯ï¼falseï¼å¦ |
| | | * @return è¿åå类模åè§å¾éå对象 |
| | | */ |
| | | List<DockingPreViewModelVO> selectDockingPreViewModelByClassId(String classifyId, boolean isContainAttr); |
| | | } |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrMapping; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrRange; |
| | | import com.vci.ubcs.code.entity.DockingPreMetaAttr; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.feign.IMdmInterJtClient; |
| | | import com.vci.ubcs.code.mapper.DockingPreAttrMappingMapper; |
| | | import com.vci.ubcs.code.service.IDockingPreAttrMappingService; |
| | | import com.vci.ubcs.code.service.IDockingPreAttrRangeService; |
| | | import com.vci.ubcs.code.service.IDockingPreMetaAttrService; |
| | | import com.vci.ubcs.code.service.*; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrRangeVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.DockingGroupDataVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.DockingMainData; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.DockingViewVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.ResultDataVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.result.DataObjectVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.result.DataVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.group.result.ResultDataObject; |
| | | import com.vci.ubcs.code.wrapper.DockingPreAttrMappingWrapper; |
| | | import com.vci.ubcs.code.wrapper.DockingPreAttrRangeWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /*** |
| | |
| | | */ |
| | | @Service |
| | | public class DockingPreAttrMappingServiceImpl extends ServiceImpl<DockingPreAttrMappingMapper, DockingPreAttrMapping> implements IDockingPreAttrMappingService { |
| | | |
| | | |
| | | |
| | | @Value("${docking.apply.unitCode:410-MDM}") |
| | | public String dockingApplyUnitCode; |
| | | @Autowired(required = false) |
| | | private IMdmInterJtClient mdmInterJtClient; |
| | | |
| | | /*** |
| | | * éå¢åç±»å±æ§å±æ§æ å°é
ç½®æå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | DockingPreAttrMappingMapper dockingPreAttrMappingMapper; |
| | | private DockingPreAttrMappingMapper dockingPreAttrMappingMapper; |
| | | |
| | | /*** |
| | | * ä¸å¡æ°æ®å±æ§æå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | private MdmEngineService mdmEngineService; |
| | | |
| | | /*** |
| | | * éå¢å±æ§æå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | IDockingPreMetaAttrService dockingPreMetaAttrService; |
| | | private IDockingPreMetaAttrService dockingPreMetaAttrService; |
| | | /*** |
| | | * 屿§åå¼èå´æå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | IDockingPreAttrRangeService dockingPreAttrRangeService; |
| | | private IDockingPreAttrRangeService dockingPreAttrRangeService; |
| | | |
| | | |
| | | /*** |
| | | * éå¢åç±»æå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | private IDockingPreClassifyService dockingPreClassifyService; |
| | | |
| | | /*** |
| | | * ç³è¯·åæå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | private IDockingPreApplyFormService dockingPreApplyFormService; |
| | | |
| | | |
| | | /*** |
| | | * 模åè§å¾åæå¡ |
| | | */ |
| | | @Autowired(required = false) |
| | | private IDockingPreViewModelService dockingPreViewModelService; |
| | | |
| | | |
| | | /*** |
| | | * æ ¹æ®ä¸»æ°æ®å类主é®è·åå类信æ¯é
ç½® |
| | | * @param codeClassifyId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DockingPreAttrMappingVO> getdockingAttrMappingsByCodeclassId(String codeClassifyId) { |
| | | public List<DockingPreAttrMappingVO> getDockingAttrMappingsByCodeClassifyId(String codeClassifyId,String sourceClassifyId) { |
| | | VciBaseUtil.alertNotNull(codeClassifyId,"ä¸»æ°æ®å类主é®"); |
| | | //VciBaseUtil.alertNotNull(sourceClassifyId,"éå¢å类主é®"); |
| | | //é¦å
è·åå类模æ¿å±æ§ï¼ç¶åä¸å±æ§é
ç½®åæ¯è¾ï¼ä»¥é²è¢«æå¢å 屿§çå¯è½ |
| | | List<DockingPreMetaAttr> dockingPreMetaAttrList= dockingPreMetaAttrService.selectByWrapper(Wrappers.<DockingPreMetaAttr>query().lambda().eq(DockingPreMetaAttr::getSourceClassifyId,codeClassifyId)); |
| | | List<DockingPreAttrMapping> dockingPreAttrMappings=this.selectByWrapper(Wrappers.<DockingPreAttrMapping>query().lambda().eq(DockingPreAttrMapping::getSourceClassifyId, codeClassifyId)); |
| | | List<DockingPreMetaAttr> dockingPreMetaAttrList= dockingPreMetaAttrService.selectByWrapper(Wrappers.<DockingPreMetaAttr>query().lambda().eq(DockingPreMetaAttr::getSourceClassifyId,sourceClassifyId)); |
| | | List<DockingPreAttrMapping> dockingPreAttrMappings=this.selectByWrapper(Wrappers.<DockingPreAttrMapping>query().lambda().eq(DockingPreAttrMapping::getSourceClassifyId, sourceClassifyId).eq(DockingPreAttrMapping::getTargetClassifyId, codeClassifyId)); |
| | | Map<String/**屿§ä¸»é®**/, DockingPreAttrMapping> dockingPreAttrMappingMap = dockingPreAttrMappings.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getMetaListId(), t -> t)); |
| | | |
| | | List<DockingPreAttrMapping> newDockingPreAttrMappingList=new ArrayList<>(); |
| | |
| | | if(dockingPreAttrMappingMap.containsKey(attrOid)){ |
| | | dockingPreAttrMapping= dockingPreAttrMappingMap.get(attrOid); |
| | | }else{ |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreAttrMapping, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreAttrMapping.setMetaListId(dockingPreMetaAttr.getOid());//屿§ä¸»é® |
| | | dockingPreAttrMapping.setSourceAttrKey(dockingPreMetaAttr.getEnglishName());//è±æåç§° |
| | | dockingPreAttrMapping.setSourceAttrName(dockingPreMetaAttr.getChineseName());//䏿åç§° |
| | |
| | | } |
| | | return dockingPreAttrMappingVOList; |
| | | } |
| | | private String code=""; |
| | | |
| | | private String msg=""; |
| | | |
| | | /*** |
| | | * åéå¢ç³è¯·éå¢ç |
| | | * @param oids |
| | | * @param btmName |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R applyGroupCode(String oids, String btmName) throws VciBaseException { |
| | | List<BaseModel> updateCbos=new ArrayList<BaseModel>(); |
| | | List<DockingPreApplyForm> dockingPreAttrMappings=new ArrayList<>(); |
| | | VciBaseUtil.alertNotNull(oids,"éæ©çæ°æ®"); |
| | | VciBaseUtil.alertNotNull(btmName,"ä¸å¡ç±»å"); |
| | | //List<BaseModelVO> codeWupins=mdmEngineService.listByIds(VciBaseUtil.str2List(oids)); |
| | | List<BaseModelVO> dataModelList = new ArrayList<>(); |
| | | if (!CollectionUtils.isEmpty(dataModelList)) { |
| | | DockingGroupDataVO dockingGroupDataVO = new DockingGroupDataVO(); |
| | | //ç³è¯·ååç³è¯·å对象å
³ç³» |
| | | Map<String, DockingPreApplyForm> addDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>(); |
| | | Map<String, DockingPreApplyForm> editDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>(); |
| | | Map<String, BaseModelVO> baseModelVOMap = new HashMap<String, BaseModelVO>(); |
| | | //ç»ç»æ°æ® |
| | | dockingGroupDataVO = queryApplycodeDataObjects(dataModelList, addDockingPreApplyFormMap, editDockingPreApplyFormMap, baseModelVOMap); |
| | | ResultDataObject resultDataObject = mdmInterJtClient.receiveAddApply(dockingGroupDataVO); |
| | | code = resultDataObject.getCode(); |
| | | msg = resultDataObject.getMsg(); |
| | | if ("1".equals(resultDataObject.getCode())) {//ç»ææ£ç¡®çæ
åµ |
| | | List<DataObjectVO> dataObjectVOList = resultDataObject.getData(); |
| | | dataObjectVOList.stream().forEach(dataObject -> { |
| | | boolean isEditDatas = false; |
| | | String code2 = dataObject.getCode(); |
| | | DataVO data2 = dataObject.getData(); |
| | | String applyId = data2.getApplyId();//ç³è¯·åid |
| | | String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//éå¢ç 段 |
| | | msg = dataObject.getMsg(); |
| | | if (code2.equals("1")) {//ç»ææ£ç¡®çæ
åµ |
| | | if (!"".equals(customCoding)) { |
| | | isEditDatas = true; |
| | | } |
| | | } |
| | | //éè¦ä¿®æ¹çç³è¯·åæ°æ® |
| | | if (editDockingPreApplyFormMap.containsKey(applyId)) { |
| | | DockingPreApplyForm dockingPreApplyForm = editDockingPreApplyFormMap.get(applyId); |
| | | dockingPreApplyForm.setCode(code2); |
| | | dockingPreApplyForm.setMsg("ç³è¯·ï¼" + msg); |
| | | dockingPreApplyForm.setGroupCode(customCoding); |
| | | ObjectMapper mp = new ObjectMapper(); |
| | | String writeValueAsString = null; |
| | | try { |
| | | writeValueAsString = mp.writeValueAsString(dataObject); |
| | | dockingPreApplyForm.setContent(writeValueAsString); |
| | | } catch (JsonProcessingException e) { |
| | | } |
| | | } |
| | | //æ°å¢çç³è¯·åæ°æ® |
| | | if (addDockingPreApplyFormMap.containsKey(applyId)) { |
| | | DockingPreApplyForm dockingPreApplyForm = addDockingPreApplyFormMap.get(applyId); |
| | | dockingPreApplyForm.setCode(code2); |
| | | dockingPreApplyForm.setMsg("ç³è¯·ï¼" + msg); |
| | | dockingPreApplyForm.setGroupCode(customCoding); |
| | | ObjectMapper mp = new ObjectMapper(); |
| | | String writeValueAsString = null; |
| | | try { |
| | | writeValueAsString = mp.writeValueAsString(dataObject); |
| | | dockingPreApplyForm.setContent(writeValueAsString); |
| | | } catch (JsonProcessingException e) { |
| | | } |
| | | } |
| | | //妿æéå¢ç åæ´æ°æ°æ® |
| | | if (isEditDatas) { |
| | | if (baseModelVOMap.containsKey(applyId)) { |
| | | BaseModelVO baseModelVO = baseModelVOMap.get(applyId); |
| | | BaseModel baseModel = new BaseModel(); |
| | | BeanUtilForVCI.copyDeclaredIgnoreCase(baseModelVO, baseModel); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel); |
| | | baseModelVO.setId(customCoding); |
| | | updateCbos.add(baseModel);//æ´æ°æ°æ®éå¢code |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | editDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> { |
| | | dockingPreApplyForm.setCode("2"); |
| | | dockingPreApplyForm.setMsg("ç³è¯·ï¼" + msg); |
| | | dockingPreApplyForm.setContent(""); |
| | | dockingPreApplyForm.setGroupCode(""); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(dockingPreApplyForm); |
| | | }); |
| | | addDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> { |
| | | dockingPreApplyForm.setCode("2"); |
| | | dockingPreApplyForm.setMsg("ç³è¯·ï¼" + msg); |
| | | dockingPreApplyForm.setContent(""); |
| | | dockingPreApplyForm.setGroupCode(""); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | }); |
| | | } |
| | | if (editDockingPreApplyFormMap.size() > 0) { |
| | | dockingPreAttrMappings.addAll(editDockingPreApplyFormMap.values());//æ·»å ç³è¯·åæ°æ® |
| | | } |
| | | if (addDockingPreApplyFormMap.size() > 0) { |
| | | dockingPreAttrMappings.addAll(addDockingPreApplyFormMap.values());//éè¦ä¿®æ¹çç³è¯·åæ°æ® |
| | | } |
| | | //ä¿åè¡¨åæ°æ® |
| | | dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings); |
| | | //mdmEngineService.saveBatch(updateCbos);//ä¿åæ°æ® |
| | | } |
| | | return R.success("ç³è¯·æ¥å£è°ç¨æå"); |
| | | } |
| | | |
| | | /*** |
| | | * å¯¹è±¡è½¬æ¢ |
| | |
| | | } |
| | | return dockingPreAttrMappingVOList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç»ç»æ°æ® |
| | | * */ |
| | | private DockingGroupDataVO queryApplycodeDataObjects(List<BaseModelVO> codeWupins,Map<String,DockingPreApplyForm> addDockingPreApplyFormMap,Map<String,DockingPreApplyForm> editDockingPreApplyFormMap,Map<String,BaseModelVO> codeWupinMap) throws VciBaseException{ |
| | | try { |
| | | String curUserName = AuthUtil.getUser().getUserName(); |
| | | //ç³è¯·çæ°æ® |
| | | List<DockingMainData> mainDataList=new ArrayList<DockingMainData>(); |
| | | for (BaseModelVO dataBusinessObject : codeWupins) { |
| | | String format = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()); |
| | | String codeclsfid = dataBusinessObject.getData().getOrDefault("codeclsfid",""); |
| | | String btmName = dataBusinessObject.getBtmname(); |
| | | String oid = dataBusinessObject.getOid(); |
| | | |
| | | DockingPreApplyForm dockingPreApplyForm = new DockingPreApplyForm(); |
| | | |
| | | String dataOid = dataBusinessObject.getOid(); |
| | | Map<String, String> conditionsMap = new HashMap<String, String>(); |
| | | List<DockingPreApplyForm> applyFormObjects = dockingPreApplyFormService.list(Wrappers.<DockingPreApplyForm>query().lambda().eq(DockingPreApplyForm::getDataOid, dataOid).eq(DockingPreApplyForm::getOperationType, "1")); |
| | | String apllyCode = ""; |
| | | if (!CollectionUtils.isEmpty(applyFormObjects)) { |
| | | dockingPreApplyForm = applyFormObjects.get(0); |
| | | apllyCode = dockingPreApplyForm.getId(); |
| | | editDockingPreApplyFormMap.put(apllyCode, dockingPreApplyForm);//ç³è¯·ååç³è¯·å对象å
³ç³» |
| | | } else { |
| | | apllyCode = dockingApplyUnitCode + "-" + format; |
| | | dockingPreApplyForm.setId(apllyCode); |
| | | dockingPreApplyForm.setName(""); |
| | | dockingPreApplyForm.setOperationType("2"); |
| | | dockingPreApplyForm.setDescription(dataBusinessObject.getDescription());//è·åæ°æ®æè¿°ä¿¡æ¯ |
| | | dockingPreApplyForm.setDataOid(oid); |
| | | dockingPreApplyForm.setDataBtmName(btmName); |
| | | addDockingPreApplyFormMap.put(apllyCode, dockingPreApplyForm);//ç³è¯·ååç³è¯·å对象å
³ç³» |
| | | } |
| | | |
| | | codeWupinMap.put(apllyCode, dataBusinessObject);//ç³è¯·ååå¯¹åºæ°æ®å
³ç³» |
| | | conditionsMap = new HashMap<String, String>(); |
| | | conditionsMap.put("jtargetclsfid", codeclsfid);//è§å¾oid |
| | | |
| | | List<DockingPreAttrMapping> dockingPreAttrMappingList = this.selectByWrapper(Wrappers.<DockingPreAttrMapping>query().lambda().eq(DockingPreAttrMapping::getTargetClassifyId, codeclsfid)); |
| | | if (CollectionUtils.isEmpty(dockingPreAttrMappingList)) { |
| | | throw new Exception("æ ¹æ®æéçæ°æ®ï¼æ²¡ææ¾å°å¯¹åºçéå¢å类设置ï¼è¯·æ ¸å¯¹!"); |
| | | } |
| | | String jsourceclsfid = dockingPreAttrMappingList.get(0).getSourceClassifyId(); |
| | | //è·åæ°æ®æ¨¡ååç±»ä¿¡æ¯ |
| | | DockingPreClassify dockingPreClassify = dockingPreClassifyService.getById(jsourceclsfid); |
| | | DockingMainData mainData = new DockingMainData(); |
| | | mainData.setApplyEntId(dockingApplyUnitCode);//ç³è¯·åä½ä»£ç |
| | | mainData.setApplyId(apllyCode);//ç³è¯·åå· |
| | | mainData.setClassName(dockingPreClassify.getGetNodeLinkName());//åç±»åç§° |
| | | mainData.setCreateBy(curUserName);// |
| | | mainData.setSecretLevel("å
é¨");//å¯çº§ï¼é»è®¤ä¸ºå
é¨ |
| | | mainData.setViewInfos(getviewInfos(dockingPreClassify, dataBusinessObject));//è·åè§å¾æ¨¡å |
| | | mainDataList.add(mainData); |
| | | } |
| | | //æ ¹æ®æ°æ®æ¨¡åï¼ç»ç»æéè¦æ°æ® |
| | | DockingGroupDataVO postParameters=new DockingGroupDataVO(); |
| | | postParameters.setSysName("420-CODE");//ç³»ç»æ è¯ |
| | | postParameters.setMainData(mainDataList);// |
| | | return postParameters; |
| | | } catch (Throwable e) { |
| | | // TODO Auto-generated catch block |
| | | throw new VciBaseException("æ¥è¯¢æ°æ®åºé"+e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·å模åè§å¾ |
| | | * @param dockingPreClassify |
| | | * @param dataBusinessObject |
| | | * @throws VciBaseException |
| | | */ |
| | | private List<DockingViewVO>getviewInfos(DockingPreClassify dockingPreClassify,BaseModelVO dataBusinessObject) throws Throwable{ |
| | | List<DockingViewVO> viewInfoList=new ArrayList<>(); |
| | | String jclassOid= dockingPreClassify.getOid(); |
| | | Map<String,String>conditionsMap=new HashMap<String, String>(); |
| | | conditionsMap.put("jsourceclsfid",jclassOid); |
| | | conditionsMap.put("jviewname","ç¼ç è§å¾");//ç³è¯·åªä¼ ç¼ç è§å¾ |
| | | //æ ¹æ®åç±»æ¥è¯¢æ¨¡åè§å¾å¯¹è±¡ |
| | | List<DockingPreViewModel> dockingPreViewModels= dockingPreViewModelService.list(Wrappers.<DockingPreViewModel>query().lambda().eq(DockingPreViewModel::getSourceClassifyId,jclassOid).eq(DockingPreViewModel::getViewName,"ç¼ç è§å¾")); |
| | | for (DockingPreViewModel dockingPreViewModel : dockingPreViewModels) { |
| | | //ç»ç»æ°æ®å±æ§ä¿¡æ¯ |
| | | DockingViewVO viewInfo=new DockingViewVO(); |
| | | viewInfo.setViewName(dockingPreViewModel.getViewName());//è§å¾åç§° |
| | | viewInfo.setViewValue(getViewValueList(dockingPreViewModel,jclassOid,dataBusinessObject));//è§å¾ |
| | | viewInfoList.add(viewInfo); |
| | | } |
| | | return viewInfoList; |
| | | } |
| | | |
| | | /*** |
| | | * è·åé
ç½®ä¿¡æ¯ |
| | | * @param dockingPreViewModel |
| | | * @param jclassOid |
| | | * @param dataBusinessObject |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | private List<Map<String, Object>> getViewValueList(DockingPreViewModel dockingPreViewModel,String jclassOid,BaseModelVO dataBusinessObject) throws Throwable{ |
| | | //æé 模åè§å¾æ°æ® |
| | | List<Map<String, Object>> viewValueList=new ArrayList<Map<String,Object>>(); |
| | | String oid = dockingPreViewModel.getOid(); |
| | | Map<String,String> dataValueMap=dataBusinessObject.getData(); |
| | | String codeClassifyId=dataValueMap.get("codeclsfid"); |
| | | Map<String,String>conditionsMap=new HashMap<String, String>(); |
| | | |
| | | |
| | | |
| | | List<DockingPreAttrMapping> dockingPreAttrMappingList = this.selectByWrapper(Wrappers.<DockingPreAttrMapping>query().lambda() |
| | | .eq(DockingPreAttrMapping::getSourceClassifyId, jclassOid).eq(DockingPreAttrMapping::getTargetClassifyId, codeClassifyId)); |
| | | if(CollectionUtils.isEmpty(dockingPreAttrMappingList)) { |
| | | return viewValueList; |
| | | } |
| | | |
| | | Map<String,DockingPreAttrMapping> jintegmappconfigMap=new HashMap<String, DockingPreAttrMapping>(); |
| | | for (DockingPreAttrMapping businessObject : dockingPreAttrMappingList) { |
| | | jintegmappconfigMap.put(businessObject.getSourceAttrKey(), businessObject); |
| | | } |
| | | List<DockingPreMetaAttr> dockingPreMetaAttrList= dockingPreMetaAttrService.selectByWrapper( |
| | | Wrappers.<DockingPreMetaAttr>query().lambda().eq(DockingPreMetaAttr::getViewModelId,dockingPreViewModel.getOid()) |
| | | .eq(DockingPreMetaAttr::getSourceClassifyId,dockingPreViewModel.getSourceClassifyId())); |
| | | |
| | | Map<String,Object> viewValueMap=new HashMap<String,Object>(); |
| | | for (DockingPreMetaAttr dockingPreMetaAttr : dockingPreMetaAttrList) { |
| | | String jenglishname=dockingPreMetaAttr.getEnglishName();////éå¢é
ç½®å±æ§ |
| | | if(jintegmappconfigMap.containsKey(jenglishname)){ |
| | | DockingPreAttrMapping dockingPreAttrMapping=jintegmappconfigMap.get(jenglishname); |
| | | String attrId = dockingPreAttrMapping.getTargetAttrId();//ç¼ç 屿§id |
| | | String jtargetattrkey = dockingPreAttrMapping.getTargetAttrKey();//ç¼ç 屿§id |
| | | Object newVaue=null; |
| | | if(StringUtils.isNotBlank(jtargetattrkey)){ |
| | | getAttrRange(dockingPreMetaAttr);//è·ååæ®µåå¼èå´ |
| | | String value=dataValueMap.get(jtargetattrkey)==null?"":dataValueMap.getOrDefault(jtargetattrkey,""); |
| | | newVaue = getVaue(dockingPreMetaAttr, value); |
| | | }else{ |
| | | newVaue = getVaue(dockingPreMetaAttr, ""); |
| | | } |
| | | if(newVaue==null||"".equals(newVaue)){ |
| | | newVaue= dockingPreMetaAttr.getDefaultValue(); |
| | | } |
| | | viewValueMap.put(jenglishname, newVaue); |
| | | } |
| | | } |
| | | |
| | | viewValueList.add(viewValueMap); |
| | | return viewValueList; |
| | | } |
| | | |
| | | /*** |
| | | * è·å屿§æä¸¾æ å°é
ç½® |
| | | */ |
| | | Map<String,Map<String,DockingPreAttrRange>> attrRangeMap=new HashMap<String, Map<String,DockingPreAttrRange>>(); |
| | | private void getAttrRange(DockingPreMetaAttr jmetaatter) throws Throwable{ |
| | | |
| | | String jmetalistoid = jmetaatter.getOid(); |
| | | if(attrRangeMap.containsKey(jmetalistoid)) { |
| | | return; |
| | | } |
| | | Map<String,String>conditionsMap=new HashMap<String, String>(); |
| | | conditionsMap.put("jmetalistid", jmetalistoid);//è§å¾oid |
| | | List<DockingPreAttrRange> dockingPreAttrRangeList = dockingPreAttrRangeService.selectByWrapper(Wrappers.<DockingPreAttrRange>query().lambda().eq(DockingPreAttrRange::getMetaListId, jmetalistoid)); |
| | | if (CollectionUtils.isEmpty(dockingPreAttrRangeList)) { |
| | | return; |
| | | } |
| | | Map<String, DockingPreAttrRange> rangeMap = new HashMap<String, DockingPreAttrRange>(); |
| | | rangeMap = dockingPreAttrRangeList.stream().collect(Collectors.toMap(s -> s.getNumTextValue(), t -> t, (o1, o2) -> o2)); |
| | | attrRangeMap.put(jmetalistoid, rangeMap); |
| | | |
| | | } |
| | | /**** |
| | | * å¼ç±»åè½¬æ¢ |
| | | * @param jmetaatter |
| | | * @param value |
| | | * @return |
| | | * @throws Throwable |
| | | */ |
| | | private Object getVaue(DockingPreMetaAttr jmetaatter,String value) throws Throwable{ |
| | | //jmetadatatype å
æ°æ®ç±»åï¼1 å符å, 2 æ´å, 3 é¿æ´å, 4 å精度, 5 å精度,6 æ¥æå, 7 æ¶é´å, 8 å¸å°å, 9 æä»¶, 10å¤ååï¼ |
| | | int jmetadatatype = jmetaatter.getMetaDataType(); |
| | | String jmetalistoid = jmetaatter.getOid(); |
| | | Map<String, DockingPreAttrRange> rangeMap=new HashMap<String, DockingPreAttrRange>(); |
| | | if(attrRangeMap.containsKey(jmetalistoid)){ |
| | | rangeMap = attrRangeMap.get(jmetalistoid); |
| | | if(rangeMap.containsKey(value)){ |
| | | DockingPreAttrRange dockingPreAttrRange = rangeMap.get(value); |
| | | value=dockingPreAttrRange.getNumText();//å°ç¼ç 屿§åå¼è½¬æ¢æéå¢å¯¹åºçåå¼ |
| | | } |
| | | } |
| | | |
| | | if(jmetadatatype==1){//1 å符å |
| | | return StringUtils.isBlank(value)?"":value; |
| | | }else if(jmetadatatype==2){//2 æ´å |
| | | return StringUtils.isBlank(value)?null:Integer.parseInt(value); |
| | | }else if(jmetadatatype==3){//3 é¿æ´å |
| | | return StringUtils.isBlank(value)?null:Long.parseLong(value); |
| | | }else if(jmetadatatype==4){//4 å精度, |
| | | return StringUtils.isBlank(value)?null:Float.parseFloat(value); |
| | | }else if(jmetadatatype==5){// 5 å精度 |
| | | return StringUtils.isBlank(value)?null:Double.parseDouble(value); |
| | | }else if(jmetadatatype==6){//6 æ¥æå |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-mm-dd"); |
| | | if(StringUtils.isBlank(value)) { |
| | | return null; |
| | | }else { |
| | | try { |
| | | return simpleDateFormat.parse(value); |
| | | } catch (ParseException e) { |
| | | throw new VciBaseException("date", new String[]{"æ¥ææ ¼å¼è½¬æ¢é误"}); |
| | | } |
| | | } |
| | | }else if(jmetadatatype==7){//7 æ¶é´å |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss"); |
| | | if(StringUtils.isBlank(value)) { |
| | | return null; |
| | | }else{ |
| | | try { |
| | | return simpleDateFormat.parse(value); |
| | | } catch (ParseException e) { |
| | | throw new VciBaseException("date", new String[]{"æ¥ææ ¼å¼è½¬æ¢é误"}); |
| | | } |
| | | } |
| | | }else if(jmetadatatype==8){//8 å¸å°å |
| | | return value; |
| | | }else if(jmetadatatype==9){//9 æä»¶, |
| | | return value; |
| | | }else if(jmetadatatype==10){//10å¤åå |
| | | return value;//符å忝ä»ä¹ä¸ä¸å¦ä½å¤ç |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrRange; |
| | | import com.vci.ubcs.code.entity.DockingPreClassify; |
| | | import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus; |
| | | import com.vci.ubcs.code.mapper.DockingPreClassifyMapper; |
| | | import com.vci.ubcs.code.service.IDockingPreClassifyService; |
| | | import com.vci.ubcs.code.service.IDockingPreViewModelService; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreViewModelVO; |
| | | import com.vci.ubcs.code.wrapper.DockingPreClassifyWrapper; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmBtmTypeConstant.CODE_CLASSIFY_OID_FIELD; |
| | | import static com.vci.ubcs.code.service.impl.CodeClassifyServiceImpl.PARENT_FIELD_NAME; |
| | | |
| | | /** |
| | | * éå¢åç±»ä¸å¡æå¡ |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class DockingPreClassifyServiceImpl extends ServiceImpl<DockingPreClassifyMapper, DockingPreClassify> implements IDockingPreClassifyService { |
| | | /*** |
| | | * éå¢åç±»å±æ§ |
| | | */ |
| | | @Resource |
| | | private DockingPreClassifyMapper dockingPreClassifyMapper; |
| | | |
| | | /*** |
| | | * éå¢åç±»å±æ§ |
| | | */ |
| | | @Resource |
| | | private IDockingPreViewModelService dockingPreViewModelService; |
| | | |
| | | /** |
| | | * 对象çæä½ |
| | | */ |
| | | @Resource |
| | | private RevisionModelUtil revisionModelUtil; |
| | | /*** |
| | | * éå¢åç±»æ å¯¹è±¡æ¥ |
| | | *@param treeQueryObject éå¢åç±»æ¥è¯¢å¯¹è±¡ |
| | | *@return è¿ååç±»æ 对象 |
| | | */ |
| | | @Override |
| | | public List<Tree> treeCompanyGroupClassify(TreeQueryObject treeQueryObject) { |
| | | log.info("è·åéå¢åç±»æ start..."); |
| | | Map<String,String> conditionMap= treeQueryObject.getConditionMap(); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME.toLowerCase(Locale.ROOT)); |
| | | treeWrapperOptions.copyFromTreeQuery(treeQueryObject); |
| | | List<DockingPreClassifyVO> dockingPreClassifyVOS= getCompanyGourpClassByParentId(treeQueryObject.getParentOid(),true); |
| | | List<Tree> tree= revisionModelUtil.doList2Trees(dockingPreClassifyVOS,treeWrapperOptions,(DockingPreClassifyVO s) ->{ |
| | | //å¯ä»¥å¨è¿éå¤çæ èç¹çæ¾ç¤º |
| | | return s.getId() + " " + s.getName() + (FrameworkDataLCStatus.DISABLED.getValue().equalsIgnoreCase(s |
| | | .getLcStatus()) ? (" ãåç¨ã ") : ""); |
| | | }); |
| | | Iterator var6 = tree.listIterator(); |
| | | while(var6.hasNext()){ |
| | | Tree trees = (Tree) var6.next(); |
| | | boolean checkHasChild=dockingPreClassifyMapper.checkHasChild(trees.getOid()); |
| | | //妿䏿¡ä»¶ä¼ è¿æ¥çå¼å¹é
çä¸å设置为éä¸ |
| | | if(conditionMap.containsKey(CODE_CLASSIFY_OID_FIELD)){ |
| | | trees.setChecked(true); |
| | | } |
| | | ; |
| | | if(checkHasChild){ |
| | | trees.setLeaf(false); |
| | | }else{ |
| | | trees.setLeaf(true); |
| | | } |
| | | } |
| | | log.info("è·åéå¢åç±»æ end..."); |
| | | return tree; |
| | | } |
| | | |
| | | /*** |
| | | * æ ¹æ®ç¶åç±»idæ¥è¯¢å±çº§æ æ°æ®å¯¹è±¡éå |
| | | * @param pid éå¢åç±»çoid |
| | | * @return è¿åå±çº§æ æ°æ®å¯¹è±¡éå |
| | | */ |
| | | private List<DockingPreClassifyVO> getCompanyGourpClassByParentId(String pid,boolean isContainView){ |
| | | log.info("æ ¹æ®ç¶åç±»pid->"+pid+"æ¥è¯¢å±çº§æ æ°æ®å¯¹è±¡éåstart..."); |
| | | List<DockingPreClassify> doList =dockingPreClassifyMapper.selectCompanyGroupClassifyVOByTree(pid); |
| | | List<DockingPreClassifyVO>dockingPreClassifyVOS= DockingPreClassifyWrapper.build().entityVOs(doList); |
| | | if(isContainView){ |
| | | dockingPreClassifyVOS.stream().forEach(dockingPreClassifyVO -> { |
| | | List<DockingPreViewModelVO> dockingViewVOS= dockingPreViewModelService.selectDockingPreViewModelByClassId(dockingPreClassifyVO.getOid(),isContainView); |
| | | dockingPreClassifyVO.setDockingPreViewModelVOList(dockingViewVOS); |
| | | }); |
| | | } |
| | | log.info("æ ¹æ®ç¶åç±»pid->"+pid+"æ¥è¯¢å±çº§æ æ°æ®å¯¹è±¡éåend..."); |
| | | return dockingPreClassifyVOS; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrMapping; |
| | | import com.vci.ubcs.code.entity.DockingPreMetaAttr; |
| | | import com.vci.ubcs.code.mapper.DockingPreMetaAttrMapper; |
| | | import com.vci.ubcs.code.service.IDockingPreMetaAttrService; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreMetaAttrVO; |
| | | import com.vci.ubcs.code.wrapper.DockingPreMetaAttrWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class DockingPreMetaAttrServiceImpl extends ServiceImpl<DockingPreMetaAttrMapper, DockingPreMetaAttr> implements IDockingPreMetaAttrService { |
| | | |
| | | @Autowired(required = false) |
| | |
| | | public List<DockingPreMetaAttr> selectByWrapper(Wrapper wrapper) { |
| | | return dockingPreMetaAttrMapper.selectList(wrapper); |
| | | } |
| | | |
| | | /*** |
| | | * æ ¹æ®æ¨¡åè§å¾oidæ¥è¯¢æ°æ® |
| | | * @param viewModelId |
| | | * @return è¿å屿§å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<DockingPreMetaAttrVO> selectDockingPreMetaAttrByViewModelId(String viewModelId) { |
| | | log.info("æ ¹æ®æ¨¡åè§å¾oid"+viewModelId+"æ¥è¯¢æ°æ® star"); |
| | | List<DockingPreMetaAttr> dockingPreMetaAttrList= selectByWrapper(Wrappers.<DockingPreMetaAttr>query().lambda().eq(DockingPreMetaAttr::getViewModelId,viewModelId)); |
| | | List<DockingPreMetaAttrVO> dockingPreMetaAttrVOList=DockingPreMetaAttrWrapper.build().entityVOs(dockingPreMetaAttrList); |
| | | log.info("æ ¹æ®æ¨¡åè§å¾oid"+viewModelId+"æ¥è¯¢æ°æ® end"); |
| | | return dockingPreMetaAttrVOList; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.DockingPreMetaAttr; |
| | | import com.vci.ubcs.code.entity.DockingPreViewModel; |
| | | import com.vci.ubcs.code.mapper.DockingPreViewModelMapper; |
| | | import com.vci.ubcs.code.service.IDockingPreMetaAttrService; |
| | | import com.vci.ubcs.code.service.IDockingPreViewModelService; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreMetaAttrVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreViewModelVO; |
| | | import com.vci.ubcs.code.wrapper.DockingPreMetaAttrWrapper; |
| | | import com.vci.ubcs.code.wrapper.DockingPreViewWrapper; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /*** |
| | | * é墿¨¡åæå¡ |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class DockingPreViewModelServiceImpl extends ServiceImpl<DockingPreViewModelMapper,DockingPreViewModel> implements IDockingPreViewModelService { |
| | | |
| | | /*** |
| | | * éå¢åç±»å±æ§ |
| | | */ |
| | | @Resource |
| | | private DockingPreViewModelMapper dockingPreViewModelMapper; |
| | | |
| | | |
| | | /*** |
| | | * éå¢åç±»å±æ§æ¥è¯¢æå¡ |
| | | */ |
| | | @Resource |
| | | private IDockingPreMetaAttrService dockingPreMetaAttrService; |
| | | |
| | | /** |
| | | * æ ¹æ®åç±»idæ¥è¯¢åç±»è§å¾ |
| | | * @param classifyId éå¢åç±»id |
| | | * @param isContainAttr æ¯å¦æ¥è¯¢å±æ§ï¼trueï¼ æ¯ï¼falseï¼å¦ |
| | | * @return è¿åå类模åè§å¾éå对象 |
| | | */ |
| | | @Override |
| | | public List<DockingPreViewModelVO> selectDockingPreViewModelByClassId(String classifyId, boolean isContainAttr) { |
| | | log.info("æ ¹æ®åç±»id->"+classifyId+",æ¥è¯¢åç±»è§å¾statr"); |
| | | VciBaseUtil.alertNotNull(classifyId,"éå¢å类主é®"); |
| | | List<DockingPreViewModel> dockingPreViewModels= dockingPreViewModelMapper.selectList(Wrappers.<DockingPreViewModel>query().lambda().eq(DockingPreViewModel::getSourceClassifyId,classifyId)); |
| | | List<DockingPreViewModelVO> dockingPreViewModelVOS=DockingPreViewWrapper.build().entityVOs(dockingPreViewModels); |
| | | if(isContainAttr) { |
| | | dockingPreViewModelVOS.stream().forEach(dockingPreViewModelVO -> { |
| | | String viewModelVOOid=dockingPreViewModelVO.getOid(); |
| | | String sourceClassifyId=dockingPreViewModelVO.getSourceClassifyId(); |
| | | List<DockingPreMetaAttr> dockingPreMetaAttrList=dockingPreMetaAttrService.selectByWrapper(Wrappers.<DockingPreMetaAttr>query().lambda().eq(DockingPreMetaAttr::getSourceClassifyId,sourceClassifyId).eq(DockingPreMetaAttr::getViewModelId,viewModelVOOid)); |
| | | List<DockingPreMetaAttrVO> dockingPreMetaAttrVOList= DockingPreMetaAttrWrapper.build().entityVOs(dockingPreMetaAttrList); |
| | | if(!CollectionUtils.isEmpty(dockingPreMetaAttrVOList)) { |
| | | dockingPreViewModelVO.setDockingPreMetaAttrVOList(dockingPreMetaAttrVOList); |
| | | } |
| | | }); |
| | | } |
| | | log.info("æ ¹æ®åç±»id->"+classifyId+",æ¥è¯¢åç±»è§å¾end"); |
| | | return dockingPreViewModelVOS; |
| | | } |
| | | } |
| | |
| | | } else { |
| | | //表éè¦æ¹ |
| | | // conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY) |
| | | conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_wupin where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED + |
| | | conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_classify where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED + |
| | | "' start with parentCodeClassifyOid = '" + codeClassifyOid + "' CONNECT BY PRIOR OID = parentCodeClassifyOid )"); |
| | | } |
| | | conditionMap.put("lastr", "1"); |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingLog; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingLogeVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | public class DockingLogeWrapper extends BaseEntityWrapper<DockingLog, DockingLogeVO> { |
| | | public static DockingLogeWrapper build() { |
| | | return new DockingLogeWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public DockingLogeVO entityVO(DockingLog entity) { |
| | | DockingLogeVO dockingLogeVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingLogeVO.class)); |
| | | return dockingLogeVO; |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingLogeVO> entityVOs(Collection<DockingLog> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingLogeVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingLog> voentitys(Collection<DockingLogeVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingLog>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingLog voentity( DockingLogeVO vo) { |
| | | DockingLog entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingLog.class)); |
| | | return entity; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreApplyForm; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreApplyFormVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /*** |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | public class DockingPreApplyFormWrapper extends BaseEntityWrapper<DockingPreApplyForm, DockingPreApplyFormVO> { |
| | | |
| | | public static DockingPreApplyFormWrapper build() { |
| | | return new DockingPreApplyFormWrapper(); |
| | | } |
| | | @Override |
| | | public DockingPreApplyFormVO entityVO(DockingPreApplyForm entity) { |
| | | DockingPreApplyFormVO dockingPreApplyFormVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreApplyFormVO.class)); |
| | | return dockingPreApplyFormVO; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreApplyFormVO> entityVOs(Collection<DockingPreApplyForm> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreApplyFormVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreApplyForm> voentitys(Collection<DockingPreApplyFormVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreApplyForm>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreApplyForm voentity( DockingPreApplyFormVO vo) { |
| | | DockingPreApplyForm entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreApplyForm.class)); |
| | | return entity; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrMapping; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrRange; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrRangeVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param dockingPreAttrMappings |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreAttrMappingVO> entityVOs(Collection<DockingPreAttrMapping> dockingPreAttrMappings) { |
| | | public List<DockingPreAttrMappingVO> entityVOs(Collection<DockingPreAttrMapping> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(dockingPreAttrMappings)) { |
| | | dockingPreAttrMappings.stream().forEach(dockingPreAttrMapping -> { |
| | | dockingPreAttrMappingVOList.add(entityVO(dockingPreAttrMapping)); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(entity -> { |
| | | dockingPreAttrMappingVOList.add(entityVO(entity)); |
| | | }); |
| | | } |
| | | return dockingPreAttrMappingVOList; |
| | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param dockingPreAttrMappingVOS |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreAttrMapping> voentitys(Collection<DockingPreAttrMappingVO> dockingPreAttrMappingVOS) { |
| | | public List<DockingPreAttrMapping> voentitys(Collection<DockingPreAttrMappingVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreAttrMapping> dockingPreAttrMappingList=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(dockingPreAttrMappingVOS)) { |
| | | dockingPreAttrMappingVOS.stream().forEach(dockingPreAttrMappingVO -> { |
| | | dockingPreAttrMappingList.add(voentity(dockingPreAttrMappingVO)); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(vo -> { |
| | | dockingPreAttrMappingList.add(voentity(vo)); |
| | | }); |
| | | } |
| | | return dockingPreAttrMappingList; |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrMapping; |
| | | import com.vci.ubcs.code.entity.DockingPreAttrRange; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrRangeVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreClassifyVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param dockingPreAttrRanges |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreAttrRangeVO> entityVOs(Collection<DockingPreAttrRange> dockingPreAttrRanges) { |
| | | public List<DockingPreAttrRangeVO> entityVOs(Collection<DockingPreAttrRange> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreAttrRangeVO> dockingPreAttrRangeVOList=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(dockingPreAttrRanges)) { |
| | | dockingPreAttrRanges.stream().forEach(dockingPreAttrRange -> { |
| | | dockingPreAttrRangeVOList.add(entityVO(dockingPreAttrRange)); |
| | | |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(entity -> { |
| | | dockingPreAttrRangeVOList.add(entityVO(entity)); |
| | | }); |
| | | } |
| | | return dockingPreAttrRangeVOList; |
| | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param dockingPreAttrRangeVos |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreAttrRange> voentitys(Collection<DockingPreAttrRangeVO> dockingPreAttrRangeVos) { |
| | | public List<DockingPreAttrRange> voentitys(Collection<DockingPreAttrRangeVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreAttrRange> dockingPreAttrRangeList=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(dockingPreAttrRangeVos)) { |
| | | dockingPreAttrRangeVos.stream().forEach(dockingPreAttrRangeVO -> { |
| | | dockingPreAttrRangeList.add(voentity(dockingPreAttrRangeVO)); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(vo -> { |
| | | dockingPreAttrRangeList.add(voentity(vo)); |
| | | }); |
| | | } |
| | | return dockingPreAttrRangeList; |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreClassify; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreClassifyVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | /** |
| | | *éå¢ç¼ç åç±»å
è£
ç±» |
| | |
| | | * @since 2023-05-23 |
| | | */ |
| | | public class DockingPreClassifyWrapper extends BaseEntityWrapper<DockingPreClassify, DockingPreClassifyVO> { |
| | | public static DockingPreClassifyWrapper build() { |
| | | return new DockingPreClassifyWrapper(); |
| | | } |
| | | @Override |
| | | public DockingPreClassifyVO entityVO(DockingPreClassify entity) { |
| | | DockingPreClassifyVO dockingPreClassifyVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreClassifyVO.class)); |
| | | return dockingPreClassifyVO; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreClassifyVO> entityVOs(Collection<DockingPreClassify> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreClassifyVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreClassify> voentitys(Collection<DockingPreClassifyVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreClassify>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreClassify voentity( DockingPreClassifyVO vo) { |
| | | DockingPreClassify entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreClassify.class)); |
| | | return entity; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreMetaAttr; |
| | | import com.vci.ubcs.code.entity.DockingPreViewModel; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreMetaAttrVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreViewModelVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | /** |
| | | *éå¢ç¼ç ç³è¯·æ¨¡å屿§å
è£
ç±» |
| | |
| | | * @since 2023-05-23 |
| | | */ |
| | | public class DockingPreMetaAttrWrapper extends BaseEntityWrapper<DockingPreMetaAttr, DockingPreMetaAttrVO> { |
| | | |
| | | public static DockingPreMetaAttrWrapper build() { |
| | | return new DockingPreMetaAttrWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public DockingPreMetaAttrVO entityVO(DockingPreMetaAttr entity) { |
| | | DockingPreMetaAttrVO dockingPreMetaAttrVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreMetaAttrVO.class)); |
| | | return dockingPreMetaAttrVO; |
| | | } |
| | | |
| | | |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreMetaAttrVO> entityVOs(Collection<DockingPreMetaAttr> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreMetaAttrVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreMetaAttr> voentitys(Collection<DockingPreMetaAttrVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreMetaAttr>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreMetaAttr voentity( DockingPreMetaAttrVO vo) { |
| | | DockingPreMetaAttr entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreMetaAttr.class)); |
| | | return entity; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreViewModel; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreViewModelVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | /** |
| | | *éå¢ç¼ç ç³è¯·è§å¾å
è£
ç±» |
| | |
| | | * @since 2023-05-23 |
| | | */ |
| | | public class DockingPreViewWrapper extends BaseEntityWrapper<DockingPreViewModel, DockingPreViewModelVO> { |
| | | public static DockingPreViewWrapper build() { |
| | | return new DockingPreViewWrapper(); |
| | | } |
| | | @Override |
| | | public DockingPreViewModelVO entityVO(DockingPreViewModel entity) { |
| | | DockingPreViewModelVO dockingPreViewModelVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreViewModelVO.class)); |
| | | return dockingPreViewModelVO; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreViewModelVO> entityVOs(Collection<DockingPreViewModel> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreViewModelVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(dockingPreAttrRange -> { |
| | | vos.add(entityVO(dockingPreAttrRange)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreViewModel> voentitys(Collection<DockingPreViewModelVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreViewModel>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * æ°ç»å¯¹è±¡è½¬æ¢ |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreViewModel voentity( DockingPreViewModelVO vo) { |
| | | DockingPreViewModel entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreViewModel.class)); |
| | | return entity; |
| | | } |
| | | } |
| | |
| | | mybatis-plus: |
| | | configuration: |
| | | map-underscore-to-camel-case: false |
| | | docking: |
| | | apply: |
| | | jtInterUrl: http://116.205.176.185:8099 |
| | | unitCode: 410-MDM |
| | | |
| | | ######åºç¨åºæ¬é
ç½® |
| | | #app: |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingLogeMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingLog"> |
| | | <resultMap id="plDockingLogResultMap" type="com.vci.ubcs.code.entity.DockingLog"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | <result column="CONTENT" property="content"/> |
| | | <result column="DATAOID" property="dataOid"/> |
| | | <result column="DATABTMNAME" property="dataBtmName"/> |
| | | <result column="MSG" property="msg"/> |
| | | <result column="MSG" property="msg" /> |
| | | <result column="OPERATIONTYPE" property="operationType" /> |
| | | <result column="GROUPCODE" property="groupCode" /> |
| | | </resultMap> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingPreAttrMappingMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreAttrMapping"> |
| | | <resultMap id="plDockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreAttrMapping"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingPreAttrRangeMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreAttrRange"> |
| | | <resultMap id="plDockingPreAttrRangeResultMap" type="com.vci.ubcs.code.entity.DockingPreAttrRange"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingPreClassifyMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreClassify"> |
| | | <resultMap id="plDockingClassifyResultMap" type="com.vci.ubcs.code.entity.DockingPreClassify"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | <result column="NODELINKNAME" property="getNodeLinkName"/> |
| | | <result column="PID" property="pid"/> |
| | | </resultMap> |
| | | <select id="selectCompanyGroupClassifyVOByTree" resultMap="plDockingClassifyResultMap"> |
| | | select codeclassify0.OID as oid, |
| | | codeclassify0.REVISIONOID as revisionoid, |
| | | codeclassify0.NAMEOID as nameOid, |
| | | codeclassify0.BTMNAME as btmname, |
| | | codeclassify0.LASTR as lastr, |
| | | codeclassify0.FIRSTR as firstr, |
| | | codeclassify0.LASTV as lastv, |
| | | codeclassify0.FIRSTV as firstv, |
| | | codeclassify0.CREATOR as creator, |
| | | codeclassify0.CREATETIME as createtime, |
| | | codeclassify0.LASTMODIFIER as lastmodifier, |
| | | codeclassify0.LASTMODIFYTIME as lastmodifytime, |
| | | codeclassify0.REVISIONRULE as revisionrule, |
| | | codeclassify0.VERSIONRULE as versionrule, |
| | | codeclassify0.REVISIONSEQ as revisionseq, |
| | | codeclassify0.REVISIONVALUE as revisionvalue, |
| | | codeclassify0.VERSIONSEQ as versionseq, |
| | | codeclassify0.VERSIONVALUE as versionvalue, |
| | | codeclassify0.LCTID as lctid, |
| | | codeclassify0.LCSTATUS as lcstatus, |
| | | codeclassify0.OID as oid, |
| | | codeclassify0.TS as ts, |
| | | codeclassify0.DESCRIPTION as description, |
| | | codeclassify0.OWNER as owner, |
| | | codeclassify0.COPYFROMVERSION as copyfromversion, |
| | | codeclassify0.ID as id, |
| | | codeclassify0.NAME as name, |
| | | codeclassify0.CLASSNAME as classname, |
| | | codeclassify0.NODELINK as nodelink, |
| | | codeclassify0.NODELINKNAME as nodelinkname, |
| | | codeclassify0.PID as pid |
| | | from PL_CODE_JCLASSIFY codeclassify0 |
| | | <where> |
| | | <if test="oid != null and oid != ''"> |
| | | codeclassify0.pid = '${oid}' |
| | | </if> |
| | | <if test="oid = null"> |
| | | codeclassify0.pid is null |
| | | </if> |
| | | </where> |
| | | order by id asc |
| | | </select> |
| | | |
| | | <select id="checkHasChild" resultType="java.lang.Boolean"> |
| | | select count(oid) from PL_CODE_JCLASSIFY where pid = #{oid} |
| | | </select> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingPreMetaAttrMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreMetaAttr"> |
| | | <resultMap id="plDockingPreMetaAttrResultMap" type="com.vci.ubcs.code.entity.DockingPreMetaAttr"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.DockingPreViewModelMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="DockingPreAttrMappingResultMap" type="com.vci.ubcs.code.entity.DockingPreViewModel"> |
| | | <resultMap id="plDockingPreViewModelResultMap" type="com.vci.ubcs.code.entity.DockingPreViewModel"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹", notes = "ä¼ å
¥å
æ°æ®å¯¹è±¡") |
| | | public R submit(@Valid @RequestBody AttributeDTO dto) { |
| | | public R submit(@RequestBody AttributeDTO dto) { |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return R.status(attributeService.submit(dto)); |
| | | } |
| | |
| | | |
| | | private final String REGEXP = "^[A-Za-z]+$"; |
| | | |
| | | @Resource |
| | | private BtmTypeMapper btmTypeMapper; |
| | | |
| | | @Override |
| | | public boolean deleteLogic(@NotEmpty List<Long> ids) { |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean submit(AttributeDTO dto) { |
| | | if (Pattern.compile(REGEXP).matcher(dto.getId()).matches()){ |
| | | if (!Pattern.compile(REGEXP).matcher(dto.getId()).matches()){ |
| | | throw new VciBaseException("屿§åç§°{0}åªè½æ¯è±æ",new Object[]{dto.getId()}); |
| | | } |
| | | LambdaQueryWrapper<Attribute> wrapper = Wrappers.<Attribute>query().lambda().eq(Attribute::getId, dto.getId()); |
| | | Long count = baseMapper.selectCount((Func.isEmpty(dto.getId())) ? wrapper : wrapper.notIn(Attribute::getId, dto.getId())); |
| | | Long count = baseMapper.selectCount((Func.isEmpty(dto.getOid())) ? wrapper : wrapper.notIn(Attribute::getOid, dto.getOid())); |
| | | if (count > 0L) { |
| | | throw new ServiceException("屿§åå·²åå¨!"); |
| | | } |
| | | Attribute omdAttribute = BeanUtil.copy(dto, Attribute.class); |
| | | Attribute attribute = AttributeWrapper.build().copyBeforeSave(dto); |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return saveOrUpdate(omdAttribute); |
| | | return saveOrUpdate(attribute); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.dto.AttributeDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.*; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.system.cache.DictBizCache; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Override |
| | | public AttributeVO entityVO(Attribute entity) { |
| | | AttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, AttributeVO.class)); |
| | | vo.setTypeValue(DictBizCache.getValue(vo.getTypeCode(),vo.getTypeKey())); |
| | | vo.setTypeValue(EnumCache.getValue(vo.getTypeCode(),vo.getTypeKey())); |
| | | if (StringUtil.isNotBlank(vo.getReferTypeCode())){ |
| | | vo.setReferTypeValue(DictBizCache.getValue(vo.getReferTypeCode(),vo.getReferTypeKey())); |
| | | vo.setReferTypeValue(EnumCache.getValue(vo.getReferTypeCode(),vo.getReferTypeKey())); |
| | | } |
| | | vo.setDictValue(vo.getDictKey()); |
| | | vo.setTypeValue(vo.getTypeKey()); |
| | | if (StringUtil.isNotBlank(vo.getDictCode())) { |
| | | vo.setDictValue(EnumCache.getValue(vo.getDictCode(),vo.getDictKey())); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | |
| | | public List<AttributeVO> listEntityVO(List<Attribute> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * å¨ä¿åä¹åè¦è®¾ç½®é»è®¤å±æ§ |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | public Attribute copyBeforeSave(AttributeDTO dto) { |
| | | Attribute attribute = BeanUtil.copy(dto, Attribute.class); |
| | | Objects.requireNonNull(attribute); |
| | | String currentUser = AuthUtil.getUserAccount(); |
| | | Date now = new Date(); |
| | | if (StringUtil.isBlank(dto.getOid())) { |
| | | attribute.setBtmName(BtmTypeConstant.ATTRIBUTE); |
| | | attribute.setCreator(currentUser); |
| | | attribute.setCreateTime(now); |
| | | attribute.setOwner(currentUser); |
| | | attribute.setOid(VciBaseUtil.getPk()); |
| | | } |
| | | attribute.setLastModifier(currentUser); |
| | | attribute.setLastModifyTime(now); |
| | | attribute.setTs(now); |
| | | return attribute; |
| | | } |
| | | } |