Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
| | |
| | | import request from "@/router/axios"; |
| | | |
| | | //表头 |
| | | export const MasterTable =(params)=>{ |
| | | return request({ |
| | | url: 'api/ubcs-code/mdmEngineController/getUIInfoByClassifyOid', |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //è¡¨æ ¼ |
| | | export const TableData =(params)=>{ |
| | | return request({ |
| | | url: 'api/ubcs-code/mdmEngineController/gridTableDataByClassifyOid', |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //é«çº§æ¥è¯¢ |
| | | export const FindData =(params)=>{ |
| | | return request({ |
| | | url: 'api/ubcs-code/mdmEngineController/gridTableDataByClassifyOid', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |
|
| | | import request from '@/router/axios';
|
| | |
|
| | | export const downloadTemplate = (params) => {
|
| | | return request({
|
| | | url: '/api/ubcs-code/mdmEngineController/downloadTopImportExcel ',
|
| | | method: 'get',
|
| | | params
|
| | | })
|
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, limit, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/listFiles', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | limit |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (oids) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/deleteFile', |
| | | method: 'post', |
| | | params: { |
| | | oids |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const upload = (row) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/uploadFile', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/uploadFile', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const download = (oids) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/downloadFilesByOids', |
| | | method: 'get', |
| | | params: { |
| | | oids |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æä»¶ä¸»é®è·å对象 |
| | | * @param oid ä¸»é® |
| | | * @return æä»¶æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | export const getFile = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/get', |
| | | method: 'get', |
| | | params: { |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const listFilesByOids = (oids) => { |
| | | return request({ |
| | | url: '/api/ubcs-resource/fileController/listFilesByOids', |
| | | method: 'get', |
| | | params: { |
| | | oids |
| | | } |
| | | }) |
| | | } |
| | |
| | | export const personnelSave = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/vciflow/start', |
| | | method: 'get', |
| | | params: params |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | // 人å设置ä¿å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template>
|
| | | <el-dialog :title="title" :visible="visible" append-to-body>
|
| | | <Divider text="导å
¥æç¤º" left="30px"></Divider>
|
| | | <ul>
|
| | | <li v-for="(item, index) in tipInfo" :key="index">
|
| | | {{ item }}
|
| | | </li>
|
| | | </ul>
|
| | | <div class="radio_box">
|
| | | <span>åç±»çè·¯å¾ä½¿ç¨ç屿§:</span>
|
| | | <el-radio-group v-model="classifyAttr">
|
| | | <el-radio label="id">åç±»ç¼å·</el-radio>
|
| | | <el-radio label="name">åç±»åç§°</el-radio>
|
| | | </el-radio-group>
|
| | | </div>
|
| | | <Divider text="excelæä»¶ï¼éæ©æä»¶åä¼èªå¨ä¸ä¼ " left="30px"></Divider>
|
| | | <el-upload
|
| | | class="upload"
|
| | | :accept="accept"
|
| | | :action="action"
|
| | | :before-upload="beforeUpload"
|
| | | :on-exceed="handleExceed"
|
| | | >
|
| | | <el-button size="small" type="primary"><i class="el-icon-upload"></i> ç¹å»ä¸ä¼ </el-button>
|
| | | </el-upload>
|
| | | <template #footer>
|
| | | <el-button type="primary" size="small" @click="downloadTemplateFun">ä¸è½½å¯¼å
¥æ¨¡æ¿</el-button>
|
| | | <el-button size="small">å
³é</el-button>
|
| | | </template>
|
| | | </el-dialog>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { downloadTemplate } from '../../api/batchImport/index'
|
| | | export default {
|
| | | name: "",
|
| | | props: {
|
| | | title: {
|
| | | type: String,
|
| | | default: "æ¹éç³è¯·ç¼ç ",
|
| | | },
|
| | | tipInfo: {
|
| | | type: Array,
|
| | | default: () => [],
|
| | | },
|
| | | visible: {
|
| | | type: Boolean,
|
| | | default: false,
|
| | | },
|
| | | accept: {
|
| | | type: String,
|
| | | default: '.xlsx, .xls'
|
| | | },
|
| | | codeClassifyOid: {
|
| | | type: String,
|
| | | default: ''
|
| | | },
|
| | | downloadTemplateFun: {
|
| | | type: Function
|
| | | }
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | classType: "classCode",
|
| | | };
|
| | | },
|
| | | computed: {
|
| | | action() {
|
| | | console.log(process, 'process');
|
| | | return '/api/ubcs-code/mdmEngineController/mdmEngineController/batchTopImportCode'
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | beforeUpload(file) {
|
| | | const fileType = file.name.split('.').pop()
|
| | | if (fileType !== 'xlsx' && fileType !== 'xls') {
|
| | | // ä¸ä¼ æ ¼å¼ä¸ç¬¦åè¦æ±ï¼æç¤ºé误信æ¯å¹¶åæ¶ä¸ä¼
|
| | | this.$message.error('åªå
许ä¸ä¼ xlsxãxlsæ ¼å¼çæä»¶');
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped>
|
| | | ul {
|
| | | color: rgb(188, 188, 188);
|
| | | margin: 20px 0 0 0;
|
| | | padding: 0;
|
| | | padding-left: 30px;
|
| | | list-style: none;
|
| | | li {
|
| | | margin-bottom: 5px;
|
| | | font-size: 12px;
|
| | | }
|
| | | }
|
| | | .radio_box {
|
| | | padding-left: 30px;
|
| | | margin: 20px 0 25px 0;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | span {
|
| | | margin-right: 20px;
|
| | | }
|
| | | }
|
| | | .upload {
|
| | | padding-left: 30px;
|
| | | margin-top: 30px;
|
| | | }
|
| | | </style>
|
| | |
| | | <basic-container> |
| | | <div class="testbox"> |
| | | <div style="margin-top: 10px;display: flex;flex-wrap: wrap;width: 100%;"> |
| | | <el-button size="small" type="primary" plain @click="addvisible=true">å¢å |
| | | <FormTemplateDialog |
| | | :visible.sync="addvisible" |
| | | :type="add" |
| | | :templateOid="templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | > |
| | | </FormTemplateDialog></el-button> |
| | | <el-button size="small" type="primary" plain @click="editvisible=true">ç¼è¾ |
| | | <FormTemplateDialog |
| | | :visible.sync="editvisible" |
| | | :type="edit" |
| | | :templateOid="templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | ></FormTemplateDialog></el-button> |
| | | <el-button size="small" type="primary" plain>æ¹é导å
¥ç³è¯·</el-button> |
| | | <el-button size="small" type="primary" plain>å岿°æ®å¯¼å
¥</el-button> |
| | | <el-button size="small" type="primary" plain>æ¹éç³è¯·ç¼ç </el-button> |
| | | <el-button size="small" type="primary" plain>æ¹éåå¸</el-button> |
| | | <el-button size="small" type="primary" plain>æ¥çæµç¨åå²</el-button> |
| | | <el-button size="small" type="primary" plain>å é¤</el-button> |
| | | <el-button size="small" type="primary" plain>åå¸</el-button> |
| | | <el-button size="small" type="primary" plain>æ°æ®æ´æ¹</el-button> |
| | | <el-button size="small" type="primary" plain @click="huishouHandler">åæ¶</el-button> |
| | | <el-button size="small" type="primary" plain @click="openD">å¯¼åº |
| | | <integration-transfer :visible.sync="dialogPush" :data="transferData" |
| | | :props="transferProps" @save="handelTransferSave"></integration-transfer> |
| | | <el-button plain size="small" type="primary" @click="addvisible=true">å¢å |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="findvisible=true">æ¥è¯¢ |
| | | <<<<<<< HEAD |
| | | <advanced-query :visible.sync="findvisible" :options="options"></advanced-query> |
| | | ======= |
| | | <advanced-query :visible.sync="findvisible" :options="this.options"></advanced-query> |
| | | >>>>>>> 859a64b36d107b147f44eccd0c0a76471c5e49ea |
| | | <FormTemplateDialog |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :templateOid="templateOid" |
| | | :type="add" |
| | | :visible.sync="addvisible" |
| | | > |
| | | </FormTemplateDialog> |
| | | <el-button plain size="small" type="primary" @click="editHandler">ç¼è¾ |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain>ç¸ä¼¼é¡¹æ¥è¯¢</el-button> |
| | | <el-button size="small" type="primary" plain style="margin-left: 1px;margin-top:10px">å·æ°</el-button> |
| | | <el-input placeholder="请è¾å
¥å
³é®åæå车æ¥è¯¢" style="width: 180px;margin-left: 5px;margin-top:10px" size="small"></el-input> |
| | | <FormTemplateDialog |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | :templateOid="templateOid" |
| | | :type="edit" |
| | | :title="'ä¿®æ¹ç¼ç ä¿¡æ¯'" |
| | | :visible.sync="editvisible" |
| | | ></FormTemplateDialog> |
| | | <el-button plain size="small" type="primary">æ¹é导å
¥ç³è¯·</el-button> |
| | | <el-button plain size="small" type="primary">å岿°æ®å¯¼å
¥</el-button> |
| | | <el-button plain size="small" type="primary">æ¹éç³è¯·ç¼ç </el-button> |
| | | <el-button plain size="small" type="primary">æ¹éåå¸</el-button> |
| | | <el-button plain size="small" type="primary">æ¥çæµç¨åå²</el-button> |
| | | <el-button plain size="small" type="primary">å é¤</el-button> |
| | | <el-button plain size="small" type="primary" @click="setHandler">åå¸</el-button> |
| | | <set-personnel :visible.sync="visibleFlow" :parameter="parameter" |
| | | type="PUBLIC"></set-personnel> |
| | | <el-button plain size="small" type="primary" @click="DataChange">æ°æ®æ´æ¹</el-button> |
| | | <FormTemplateDialog |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | :templateOid="templateOid" |
| | | :type="edit" |
| | | :title="'å·²å叿°æ®æ´æ¹'" |
| | | :visible.sync="DataVisible" |
| | | ></FormTemplateDialog> |
| | | <el-button plain size="small" type="primary" @click="huishouHandler">åæ¶</el-button> |
| | | <el-button plain size="small" type="primary" @click="openD">å¯¼åº |
| | | <integration-transfer :data="transferData" :props="transferProps" |
| | | :visible.sync="dialogPush" @save="handelTransferSave"></integration-transfer> |
| | | </el-button> |
| | | <el-button plain size="small" type="primary" @click="findHandler">æ¥è¯¢ |
| | | <advanced-query :options="this.options" :visible.sync="findvisible" |
| | | @echoContion="echoContion"></advanced-query> |
| | | </el-button> |
| | | <el-button plain size="small" type="primary">ç¸ä¼¼é¡¹æ¥è¯¢</el-button> |
| | | <el-button plain size="small" style="margin-left: 1px;margin-top:10px" type="primary">å·æ°</el-button> |
| | | <el-input placeholder="请è¾å
¥å
³é®åæå车æ¥è¯¢" size="small" |
| | | style="width: 180px;margin-left: 5px;margin-top:10px"></el-input> |
| | | </div> |
| | | <el-row style="height: 700px;width: 100%"> |
| | | <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700" v-loading="isLoading" @selection-change="handleSelectionChange" @sort-change="sortChange"> |
| | | <el-table v-loading="isLoading" :data="tableData" max-height="700" style="" @cell-click="handleCellClick" |
| | | @selection-change="handleSelectionChange" @sort-change="sortChange"> |
| | | <el-table-column |
| | | type="selection" |
| | | fixed |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | type="index" |
| | | fixed |
| | | label="åºå·" |
| | | type="index" |
| | | width="55"> |
| | | </el-table-column> |
| | | <div v-for="(item,index) in this.tableHeadData" :key="index"> |
| | | <el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width"> |
| | | <!-- <div>--> |
| | | <el-table-column v-for="(item,index) in this.tableHeadFindData" :key="item.id" :label="item.label" :prop="item.prop" :sortable="item.sortable" > |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input> |
| | | <span v-else>{{row[item.prop]}}</span> |
| | | <el-switch |
| | | v-if="editShow === 'true'" |
| | | v-model="row[item.prop]" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949"> |
| | | </el-switch> |
| | | </template> |
| | | <!-- <template slot-scope="{ row }">--> |
| | | <!-- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>--> |
| | | <!-- <span v-else>{{row[item.prop]}}</span>--> |
| | | <!-- <el-switch--> |
| | | <!-- v-if="editShow === 'true'"--> |
| | | <!-- v-model="row[item.prop]"--> |
| | | <!-- active-color="#13ce66"--> |
| | | <!-- inactive-color="#ff4949">--> |
| | | <!-- </el-switch>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | </div> |
| | | <!-- </div>--> |
| | | </el-table> |
| | | </el-row> |
| | | </div> |
| | | <div class="block" style="display: flex;justify-content: flex-end"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="page.currentPage" |
| | | :page-sizes="page.pageSizes" |
| | | :page-size="page.pageSizes" |
| | | :page-sizes="page.pageSizes" |
| | | :total="page.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="page.total"> |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import {MasterTable, TableData} from "@/api/GetItem"; |
| | | import {MasterTable, TableData,FindData} from "@/api/GetItem"; |
| | | import {listCodeAttributeByClassId} from '@/api/integration/integration.js' |
| | | import integrationTransfer from '@/views/integration/integrationTransfer' |
| | | import pinyin from "js-pinyin"; |
| | | import SetPersonnel from '@/components/template/SetPersonnel' |
| | | |
| | | export default { |
| | | components: { |
| | | integrationTransfer |
| | | integrationTransfer, |
| | | SetPersonnel |
| | | }, |
| | | name: "Crud.vue", |
| | | props:{ |
| | | page:{ |
| | | props: { |
| | | page: { |
| | | type: Object, |
| | | default: ()=>{ |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | codeClassifyOid:{ |
| | | type:String, |
| | | default:"" |
| | | codeClassifyOid: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | coderuleoid:{ |
| | | type:String, |
| | | default:"" |
| | | coderuleoid: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | tableDataArray:{ |
| | | tableDataArray: { |
| | | type: Array, |
| | | }, |
| | | total: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | templateOid: { |
| | | type: String, |
| | | }, |
| | | tableHeadDataFateher: { |
| | | type: Array, |
| | | }, |
| | | isLoading: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | tableHeadFindData:{ |
| | | type:Array, |
| | | }, |
| | | total:{ |
| | | type:String, |
| | | default:"" |
| | | }, |
| | | templateOid:{ |
| | | type:String, |
| | | }, |
| | | tableHeadDataFateher:{ |
| | | type:Array, |
| | | }, |
| | | isLoading:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | transferData:[], |
| | | //åå¸ |
| | | parameter:{ |
| | | ids:['0000','22222222'], |
| | | code:'8b5e2017-990f-454a-9c39-4c4eeeb57553', |
| | | type:'PUBLIC', |
| | | name:'模æ¿name', |
| | | template:'模æ¿template' |
| | | }, |
| | | visibleFlow: false, |
| | | transferData: [], |
| | | transferProps: { |
| | | key: 'oid', |
| | | label: 'name' |
| | | }, |
| | | templateOid:"", |
| | | addvisible:false, |
| | | editvisible:false, |
| | | findvisible:false, |
| | | dialogPush:false, |
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9', |
| | | tableHeadFindDatas:[], |
| | | templateOid: "", |
| | | addvisible: false, |
| | | editvisible: false, |
| | | findvisible: false, |
| | | dialogPush: false, |
| | | rowOid: '', |
| | | disabledProp: ["id"], |
| | | editingRow:null, |
| | | editingRow: null, |
| | | editShow: "", |
| | | editAttr:"", |
| | | editAttr: "", |
| | | data: [], |
| | | options:[], |
| | | options: {}, |
| | | option: { |
| | | column: [] |
| | | }, |
| | |
| | | number: "number", |
| | | datetime: "datetime", |
| | | }, |
| | | tableData:[], |
| | | tableHeadData:[], |
| | | items:{}, |
| | | seniorQueryColumns:[] |
| | | tableData: [], |
| | | DataVisible:false, |
| | | tableHeadData: [], |
| | | items: {}, |
| | | seniorQueryColumns: [], |
| | | selectRow: [] |
| | | } |
| | | }, |
| | | computed:{ |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | // this.CrudHeaderRend(); |
| | | // this.tableHeadHandle() |
| | |
| | | activated() { |
| | | this.doLayout() |
| | | }, |
| | | watch:{ |
| | | codeClassifyOid:{ |
| | | handler(newval,oldval){ |
| | | this.codeClassifyOid=newval; |
| | | watch: { |
| | | codeClassifyOid: { |
| | | handler(newval, oldval) { |
| | | this.codeClassifyOid = newval; |
| | | this.CrudHeaderRend() |
| | | }, |
| | | deep:true |
| | | deep: true |
| | | }, |
| | | tableDataArray:{ |
| | | handler(newval,oldval){ |
| | | this.tableData=newval; |
| | | // |
| | | tableDataArray: { |
| | | handler(newval, oldval) { |
| | | this.tableData = newval; |
| | | } |
| | | }, |
| | | total:{ |
| | | handler(newval,oldval){ |
| | | this.page.total=newval; |
| | | tableHeadFindData:{ |
| | | handler(newval, oldval) { |
| | | this.tableHeadFindDatas = newval; |
| | | } |
| | | }, |
| | | tableHeadDataFateher:{ |
| | | handler(newval,oldval){ |
| | | let List=newval.tableDefineVO.cols[0]; |
| | | List.forEach(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); |
| | | this.option.column=this.tableHeadData; |
| | | }) |
| | | total: { |
| | | handler(newval, oldval) { |
| | | this.page.total = newval; |
| | | } |
| | | } |
| | | }, |
| | | // tableHeadDataFateher: { |
| | | // handler(newval, oldval) { |
| | | // let List = newval.tableDefineVO.cols[0]; |
| | | // List.forEach(item => { |
| | | // let columnItem = { |
| | | // label: item.title, |
| | | // prop: item.field, |
| | | // type: this.columnType[item.type], |
| | | // sortable: item.sort, |
| | | // width: item.minWidth |
| | | // }; |
| | | // this.tableHeadData.push(columnItem); |
| | | // console.log('table',this.tableHeadData) |
| | | // }) |
| | | // } |
| | | // } |
| | | }, |
| | | methods: { |
| | | huishouHandler(){ |
| | | console.log('tem',this.templateOid) |
| | | console.log('table',this.tableData) |
| | | console.log('tabheadle',this.tableHeadData) |
| | | console.log('tableFather',this.tableHeadDataFateher) |
| | | setHandler() { |
| | | this.visibleFlow = true |
| | | }, |
| | | openD(){ |
| | | this.dialogPush=true; |
| | | huishouHandler() { |
| | | console.log('tem', this.templateOid) |
| | | console.log('table', this.tableData) |
| | | console.log('tabheadle', this.tableHeadData) |
| | | console.log('tableFather', this.tableHeadDataFateher) |
| | | }, |
| | | openD() { |
| | | this.dialogPush = true; |
| | | this.getListCodeByClassId() |
| | | }, |
| | | async getListCodeByClassId() { |
| | | this.transferData = [] |
| | | const response = await listCodeAttributeByClassId({ codeClassifyId: this.codeClassifyOid }) |
| | | const response = await listCodeAttributeByClassId({codeClassifyId: this.codeClassifyOid}) |
| | | if (response.status === 200) { |
| | | const data = response.data.data |
| | | this.transferData = data |
| | | } |
| | | }, |
| | | rend(){ |
| | | this.tableData=this.tableHeadData |
| | | rend() { |
| | | this.tableData = this.tableHeadData |
| | | }, |
| | | handleSizeChange(val){ |
| | | this.page.pageSize=val |
| | | this.$emit('pageSize',val) |
| | | this.CrudRend() |
| | | handleSizeChange(val) { |
| | | this.isLoading = true; |
| | | setTimeout(() => { |
| | | this.page.pageSize = val |
| | | this.$emit('pageSize', val) |
| | | this.CrudRend() |
| | | }, 3000); |
| | | |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.page.currentPage=val |
| | | this.$emit('currentPage',val) |
| | | this.CrudRend() |
| | | handleCurrentChange(val) { |
| | | this.isLoading = true; |
| | | setTimeout(() => { |
| | | this.page.currentPage = val |
| | | this.$emit('currentPage', val) |
| | | this.CrudRend() |
| | | }, 3000); |
| | | }, |
| | | // çå¬åå
æ ¼ç¹å»äºä»¶å¹¶å卿£å¨ç¼è¾çè¡ |
| | | handleCellClick(row, column) { |
| | | this.editingRow = row; |
| | | this.editShow = column.property; |
| | | this.rowOid=row.oid |
| | | this.rowOid = row.oid |
| | | }, |
| | | //å é¤ |
| | | enumDeleteRow(row) { |
| | |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | }, |
| | | tableHeadHandle(){ |
| | | this.options=this.tableHeadDataFateher.tableDefineVO.seniorQueryColumns |
| | | tableHeadHandle() { |
| | | this.options = this.tableHeadDataFateher.tableDefineVO.seniorQueryColumns |
| | | this.List = this.tableHeadDataFateher.tableDefineVO.cols[0]; |
| | | this.List.forEach(item => { |
| | | let columnItem = { |
| | |
| | | width: item.minWidth |
| | | }; |
| | | this.option.column.push(columnItem); |
| | | this.option.column=this.tableHeadData; |
| | | this.option.column = this.tableHeadData; |
| | | }) |
| | | }, |
| | | //è¡¨æ ¼å¤´æ¸²æ |
| | | CrudHeaderRend() { |
| | | if(this.codeClassifyOid != ""){ |
| | | if (this.codeClassifyOid != "") { |
| | | MasterTable({ |
| | | codeClassifyOid:this.codeClassifyOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | functionId: 5, |
| | | }).then(res => { |
| | | this.options=res.data.tableDefineVO.seniorQueryColumns |
| | | this.options = res.data.tableDefineVO.seniorQueryColumns |
| | | this.List = res.data.tableDefineVO.cols[0]; |
| | | this.List.forEach(item => { |
| | | let columnItem = { |
| | |
| | | width: item.minWidth |
| | | }; |
| | | this.option.column.push(columnItem); |
| | | this.option.column=this.tableHeadData; |
| | | this.templateOid=res.data.tableDefineVO.oid |
| | | this.$emit('templateOid',this.templateOid) |
| | | this.option.column = this.tableHeadData; |
| | | this.templateOid = res.data.tableDefineVO.oid |
| | | this.$emit('templateOid', this.templateOid) |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | //è¡¨æ ¼æ°æ® |
| | | CrudRend() { |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }).then(res => { |
| | | this.page.total = res.data.total; |
| | | this.data = res.data.data; |
| | | this.tableData=res.data.data; |
| | | }) |
| | | TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }).then(res => { |
| | | this.page.total = res.data.total; |
| | | this.data = res.data.data; |
| | | this.tableData = res.data.data; |
| | | }) |
| | | }, |
| | | // æåº |
| | | sortChange(val) { |
| | |
| | | }, |
| | | //å页巿° |
| | | async onLoad(val) { |
| | | console.log('å页', this.templateOid) |
| | | await TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | |
| | | //å¤é |
| | | handleSelectionChange(row) { |
| | | console.log(row) |
| | | this.rowOid = row.oid |
| | | this.selectRow = row |
| | | }, |
| | | //ç¼è¾ |
| | | editHandler() { |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | } else if (this.selectRow.length > 1) { |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ°æ®') |
| | | } else if (this.selectRow[0].lcstatus != 'Editing') { |
| | | this.$message.warning('ç¼ç ç¶æä¸æ¯âç¼è¾ä¸â,ä¸å¯ç¼è¾') |
| | | } else { |
| | | this.editvisible = true |
| | | } |
| | | }, |
| | | //é«çº§æ¥è¯¢æé® |
| | | findHandler(){ |
| | | this.findvisible=true |
| | | }, |
| | | // é«çº§æ¥è¯¢ |
| | | echoContion(val) { |
| | | console.log(val) |
| | | FindData({templateOid:this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val |
| | | }).then(res=>{ |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | //æ°æ®æ´æ¹ |
| | | DataChange(){ |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | } else if (this.selectRow.length > 1) { |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ°æ®') |
| | | } else if (this.selectRow[0].lcstatus != 'Released') { |
| | | this.$message.warning('åªæç¶æä¸ºå·²åå¸çæ°æ®æè½è¿è¡æ°æ®æ´æ¹') |
| | | } else { |
| | | this.DataVisible = true |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- 彿°å¼ç»ä»¶å°è£
åå²çº¿ -->
|
| | | <template functional>
|
| | | |
| | | <div class="divider" :style="{backgroundColor: props.bgkColor, color: props.color}">
|
| | | <span :style="{left: props.left}">{{ props.text }}</span>{{ $props }}
|
| | | </div>
|
| | | </template>
|
| | | <style lang="scss" scoped>
|
| | | .divider {
|
| | | margin: 10px 0;
|
| | | position: relative;
|
| | | width: 100%;
|
| | | height: 1px;
|
| | | background-color: rgb(196, 196, 196);
|
| | | color: rgb(164, 164, 164);
|
| | | span {
|
| | | padding: 0 10px;
|
| | | position: absolute;
|
| | | top: 50%;
|
| | | left: 10%;
|
| | | transform: translateY(-50%);
|
| | | z-index: 999;
|
| | | background-color: #fff;
|
| | | }
|
| | | }
|
| | | </style>
|
| | |
| | | :referConfig="item.referConfig || {}" |
| | | :value="form[item.referConfig.field] || item.value" |
| | | :text="form[item.referConfig.showField]" |
| | | :disabled="item.disabled" |
| | | :display="item.display" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </template> |
| | |
| | | }, |
| | | data(){ |
| | | return{ |
| | | tableHeadFindData:[], |
| | | tableHeadDataFateher:[], |
| | | templateOids:"", |
| | | tableDataArray:[], |
| | |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | this.codeClassifyOid=res.data[0].oid; |
| | | this.coderuleoid=res.data[0].attributes.coderuleoid; |
| | | this.$emit("codeClassifyOid", this.codeClassifyOid ) |
| | | this.$emit("coderuleoid", this.coderuleoid ) |
| | | }).catch(res=>{ |
| | | console.log(res) |
| | |
| | | }).then(res => { |
| | | this.tableHeadDataFateher = res.data; |
| | | this.templateOids = res.data.tableDefineVO.oid; |
| | | let List = res.data.tableDefineVO.cols[0]; |
| | | List.forEach(item => { |
| | | let columnItem = { |
| | | label: item.title, |
| | | prop: item.field, |
| | | // type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth |
| | | }; |
| | | this.tableHeadFindData.push(columnItem) |
| | | }) |
| | | this.$emit('tableHeadDataFateher', this.tableHeadDataFateher); |
| | | this.$emit('tableHeadFindData', this.tableHeadFindData); |
| | | resolve(); |
| | | }).catch(err=>{ |
| | | reject(err) |
| | |
| | | await this.TableHeadRend(); // å
æ§è¡ TableHeadRend() |
| | | this.TableRend(); // TableHeadRend() æ¹æ³å®æååæ§è¡ TableRend() |
| | | this.$emit('nodeClick',this.templateOids) |
| | | console.log(this.templateOids) |
| | | this.$emit("codeClassifyOid", this.nodeClickList.oid ) |
| | | console.log('å
æ°æ®',this.templateOids) |
| | | console.log('å
æ°æ®cod',this.codeClassifyOid) |
| | | console.log('å
æ°æ®nodeclick', this.nodeClickList.oid) |
| | | } catch (error) { |
| | | // å¤çé误 |
| | | this.$message.error(error) |
| | |
| | | <attrCrud :ProData="ProData" :crudOid="crudOid" :crudArray="crudArray" :Formlist="Formlist" :codeClassifyOid="codeClassifyOid"></attrCrud> |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | | <FlowPath :code="this.codeClassifyOid"></FlowPath> |
| | | <FlowPath :code="this.crudOid"></FlowPath> |
| | | |
| | | </span> |
| | | <span v-else-if="type.prop==='tab3'"> |
| | | <stage :code="this.codeClassifyOid"></stage> |
| | | <stage :code="this.crudOid"></stage> |
| | | </span> |
| | | </basic-container> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="options.title|| 'é件管ç'" |
| | | :visible.sync="visible" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | @close="close" |
| | | top="0" |
| | | :width="options.width|| '80%'"> |
| | | <fileContent |
| | | :options="options" |
| | | ></fileContent> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileContent from './main.vue'; |
| | | export default { |
| | | name: "inDialog", |
| | | components: { fileContent }, |
| | | props: ["options","visible"], |
| | | data(){ |
| | | return{ |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods:{ |
| | | close(){ |
| | | this.$emit("close", false); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <fileContent |
| | | :options="options" |
| | | ></fileContent> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileContent from './main.vue'; |
| | | export default { |
| | | name: "inHtml", |
| | | components: { fileContent }, |
| | | props: ["options"], |
| | | data(){ |
| | | return{ |
| | | } |
| | | }, |
| | | computed: { |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload">ä¸ ä¼ |
| | | </el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-edit" |
| | | @click="handleEdit">ä¿® æ¹ |
| | | </el-button> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">å é¤ |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | @click="handleDownload(scope.row)">ä¸è½½ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="ä¸ä¼ éä»¶å表" |
| | | append-to-body |
| | | :visible.sync="attachBox" |
| | | width="555px"> |
| | | <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-before="uploadBefore" :upload-after="uploadAfter" :upload-error="uploadError"> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getFile,upload,update, remove,download} from "@/api/resource/file"; |
| | | import {mapGetters} from "vuex"; |
| | | import {dateFormat} from "@/util/date"; |
| | | |
| | | export default { |
| | | props: ["options","visible"], |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | params:{}, |
| | | loading: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | attachBox: false, |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "æä»¶åç§°", |
| | | prop: "name", |
| | | search: true, |
| | | /*formatter:function(d){ |
| | | if(this.options.hasDownloadRight != false){ |
| | | //说ææä¸è½½æä»¶çæéï¼é£ä¹æä»¬å°±æ·»å ä¸ä¸ªè¶
龿¥ |
| | | return ''//'<a name="filenamedownloadlink " class="layui-btn layui-btn-intable" lay-event="PREVIEW" fileoid="' + d.oid +'">' + (d.id?d.id:d.name) + '</a>'; |
| | | }else{ |
| | | return d.id || d.name; |
| | | } |
| | | }*/ |
| | | }, |
| | | { |
| | | label: "æä»¶å¤§å°", |
| | | prop: "fileSize", |
| | | formatter:function(d){ |
| | | if(!d.fileSize || d.fileSize == null || d.fileSize*1 == 0 || isNaN(d.fileSize*1) ){ |
| | | return "æªç¥å¤§å°"; |
| | | }else{ |
| | | //åå§å¤§å°æ¯B |
| | | var filesize = d.fileSize*1; |
| | | if(filesize>1024*1024*1024*1024){ |
| | | return parseInt(filesize/(1024*1024*1024*1024)) + "TB"; |
| | | }else if(filesize> 1024*1024*1024){ |
| | | return parseInt(filesize/(1024*1024*1024)) + "GB"; |
| | | }else if(filesize> 1024*1024){ |
| | | return parseInt(filesize/(1024*1024)) + "MB"; |
| | | }else if(filesize> 1024){ |
| | | return parseInt(filesize/1024) + "KB"; |
| | | }else { |
| | | return filesize + "B"; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /*{ |
| | | label: "å¯çº§", |
| | | prop: "secretGradeText" |
| | | }, |
| | | { |
| | | label: "ææ¡£ç±»å«", |
| | | prop: "fileDocClassifyName" |
| | | },*/ |
| | | { |
| | | label: "å建è
", |
| | | prop: "creator" |
| | | }, |
| | | { |
| | | label: "å建æ¶é´", |
| | | prop: "createTime" |
| | | }, |
| | | ] |
| | | }, |
| | | data: [{ |
| | | btmname: "fileobject", |
| | | createTime: "2023-06-14 16:08:50.002", |
| | | creator: "1", |
| | | fileDocClassify: "undefined", |
| | | fileDocClassifyName: null, |
| | | fileExtension: "png", |
| | | filePath: "VolumnFactoryService:/f87a4c92-ce6e-458b-aad0-0c76bd5eeb35\\54120082-76aa-4092-abbf-b13cb40606c5", |
| | | fileSize: 858, |
| | | id: "assignRole", |
| | | name: "assignRole", |
| | | nameOid: "9FF4C05D-4EFA-F00B-0080-5ABB50257D4E", |
| | | oid: "54120082-76aa-4092-abbf-b13cb40606c5", |
| | | ownBtmname: "wupin", |
| | | ownbizOid: "6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9", |
| | | owner: "1", |
| | | secretGrade: null, |
| | | secretGradeText: null |
| | | }], |
| | | attachForm: {}, |
| | | attachOption: { |
| | | submitBtn: true, |
| | | emptyBtn: true, |
| | | column: [ |
| | | { |
| | | label: 'éä»¶ä¸ä¼ ', |
| | | prop: 'attachFile', |
| | | type: 'upload', |
| | | dragFile: true, |
| | | loadText: 'æä»¶ä¸ä¼ ä¸ï¼è¯·ç¨ç', |
| | | span: 24, |
| | | propsHttp: { |
| | | res: 'data' |
| | | }, |
| | | action: "/api/ubcs-resource/fileController/uploadFile" |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | delBtn: this.vaildData(this.permission.attach_delete, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | setParams(){ |
| | | var params={ |
| | | ownbizOid:options.ownbizOid || '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9', |
| | | ownbizBtm:options.ownbizBtm || 'wupin', |
| | | fileDocClassify:options.fileDocClassify || '!=processAuditSuggest' |
| | | } |
| | | this.params=params; |
| | | }, |
| | | handleUpload() { |
| | | this.attachBox = true; |
| | | }, |
| | | handleEdit() { |
| | | this.attachBox = true; |
| | | }, |
| | | uploadBefore(file, done, loading,column) { |
| | | console.log(file,column) |
| | | //å¦æä½ æ³ä¿®æ¹fileæä»¶,ç±äºä¸ä¼ çfileæ¯åªè¯»æä»¶ï¼å¿
é¡»å¤å¶æ°çfileæå¯ä»¥ä¿®æ¹ååï¼å®åèµå¼å°done彿°é,妿ä¸ä¿®æ¹çè¯ç´æ¥ådone()å³å¯ |
| | | var newFile = new File([file], '1234', { type: file.type }); |
| | | done(newFile) |
| | | this.$message.success('ä¸ä¼ åçæ¹æ³') |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.attachBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | uploadError(error, column) { |
| | | this.$message.success('ä¸ä¼ 失败åè°') |
| | | console.log(error, column) |
| | | }, |
| | | handleDownload(row) { |
| | | window.open(`${row.link}`); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("ç¡®å®å°éæ©æä»¶å é¤?", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | this.$confirm("ç¡®å®å°éæ©æ°æ®å é¤?", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params) { |
| | | //this.loading = true; |
| | | params=this.params || {} |
| | | /*getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | });*/ |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | <!-- eslint-disable vue/valid-v-for --> |
| | | <!-- eslint-disable vue/require-v-for-key --> |
| | | <template> |
| | | <vue-flowchart-editor class="vue-flowchart-editor" ref="flowChart"> |
| | | <div class="vfe-chart"> |
| | |
| | | <flow :data="flowChartData" :onAfterChange="onAfterChange" /> |
| | | <div class="tooltip"> |
| | | <template v-for="item in tooltipData"> |
| | | <p :key="item.name">{{ item.name }}: {{ item.value }}</p> |
| | | <p>{{ item.name }}: {{ item.value }}</p> |
| | | </template> |
| | | </div> |
| | | </div> |
| | |
| | | <template> |
| | | <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTree> |
| | | <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTable> |
| | | <vciWebReferDefalut v-else @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferDefalut> |
| | | <div v-if="display"> |
| | | <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTree> |
| | | <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTable> |
| | | <vciWebReferDefalut v-else @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferDefalut> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import vciWebReferDefalut from "./vciWebReferDefalut.vue"; |
| | | export default { |
| | | name: "vciWebRefer", |
| | | props: ["referConfig","value","text"], |
| | | props: ["referConfig","value","text","disabled","display"], |
| | | components: {vciWebReferTree, vciWebReferTable, vciWebReferDefalut}, |
| | | data() { |
| | | return { |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input> |
| | | <avue-input v-model="text" :disabled="disabled" :placeholder="title" @click="!disabled && (visible=true)"></avue-input> |
| | | <!--<avue-input-table ref="referTable" :props="props" :column="column" :on-load="onLoad" v-model="value" :placeholder="title" ></avue-input-table> |
| | | --> |
| | | </div> |
| | |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | export default { |
| | | name: "vciWebReferDefalut", |
| | | props:["referConfig","value","text","title"], |
| | | props:["referConfig","value","text","title","disabled"], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | formatter:item.template, |
| | | search: true |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input> |
| | | <avue-input v-model="text" :disabled="disabled" :placeholder="title" @click="!disabled && (visible=true)"></avue-input> |
| | | <!--<avue-input-table ref="referTable" :props="props" :column="column" :on-load="onLoad" v-model="value" :placeholder="title" ></avue-input-table> |
| | | --> |
| | | </div> |
| | |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | export default { |
| | | name: "vciWebReferTable", |
| | | props:["referConfig","value","text","title"], |
| | | props:["referConfig","value","text","title","disabled"], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | |
| | | <template> |
| | | <avue-input-tree ref="referTree" :props="props" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> |
| | | <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | |
| | | export default { |
| | | name: "vciWebReferTree", |
| | | props:["referConfig","value","text","title"], |
| | | props:["referConfig","value","text","title","disabled"], |
| | | data() { |
| | | return { |
| | | options: this.referConfig.options, |
| | |
| | | <template> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true"> |
| | | <div> |
| | | <el-tag v-for="tag in tags" :key="tag" closable disable-transitions effect="dark" @click="handleClickTag(tag)" |
| | | @close="handleCloseTag(tag)"> |
| | | <span> {{ tag.name }}</span> |
| | | </el-tag> |
| | | </div> |
| | | |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" width="30%"> |
| | | <el-tag v-for="tag in tags" :key="tag" closable disable-transitions effect="Plain" size="medium" |
| | | @click="handleClickTag(tag)" @close="handleCloseTag(tag)"> |
| | | <span> {{ tag.name }}</span> |
| | | </el-tag> |
| | | <el-divider v-if="tags.length !== 0"></el-divider> |
| | | <el-form :model="saveParam" class="demo-form-inline" label-position="left" label-width="auto" :rules="rules"> |
| | | <el-form-item label="æµç¨æ¨¡æ¿"> |
| | | <el-input placeholder="æµç¨æ¨¡æ¿" v-model="saveParam.modelName" disabled ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æµç¨åç§°" prop="processName"> |
| | | <el-input placeholder="æµç¨åç§°" v-model="saveParam.processName" > |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æµç¨æè¿°"> |
| | | <el-input placeholder="æµç¨æè¿°" type="textarea" :rows="4" v-model="saveParam.processDesc" > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-divider></el-divider> |
| | | <div class="btns-icon"> |
| | | <el-button type="primary" icon="el-icon-star-off" @click="handleCollect"></el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-refresh" ></el-button> --> |
| | | <el-button icon="el-icon-star-off" circle @click="handleCollect"></el-button> |
| | | </div> |
| | | <el-form :model="saveParam" class="demo-form-inline" label-position="left"> |
| | | <el-form :model="collectParam" class="demo-form-inline" label-position="left" label-width="auto"> |
| | | <el-form-item :label="item.taskName" v-for="(item, index) in initFrom" :key="index"> |
| | | <el-select style="width: 50%;" v-model="saveParam.flowTaskUsers[index]['userId']" |
| | | <el-select style="width: 80%;" filterable v-model="collectParam.flowTaskUsers[index]['userId']" |
| | | :placeholder="item.taskName" @change="handleSelect($event, index)"> |
| | | <el-option :label="key.userNames" :value="key.userId" v-for="(key, keyi) in typeName" |
| | | :key="keyi"></el-option> |
| | |
| | | // æ é¢ |
| | | title: { |
| | | typeof: String, |
| | | default: '人å设置' |
| | | default: 'æµç¨å®¡æ¹' |
| | | }, |
| | | // 模æ¿id |
| | | code: { |
| | | typeof: String, |
| | | default: '' |
| | | // åæ°ï¼éæ©çidï¼å¤ä¸ªä»¥æ°ç»æ¹å¼ä¼ éï¼['id','id']ï¼æ¨¡æ¿idï¼æ¨¡æ¿ç¨éï¼æµç¨ååï¼æµç¨æ¨¡æ¿ |
| | | parameter: { |
| | | typeof: Object, |
| | | default: () => { } |
| | | }, |
| | | // 模æ¿ç¨é |
| | | type: { |
| | | typeof: String, |
| | | default: '' |
| | | parameterKeys: { |
| | | typeof: Object, |
| | | default: () => { |
| | | return { |
| | | ids: 'ids', |
| | | flowName: 'flowName', |
| | | flowTemplate: 'flowTemplate', |
| | | code: 'code', |
| | | type: 'type' |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | watch: { |
| | | visible(n) { |
| | |
| | | data() { |
| | | return { |
| | | dialogVisible: this.visible, |
| | | isCollent: false, |
| | | initFrom: [], |
| | | tags: [], |
| | | typeName: [], |
| | | saveParam: {}, |
| | | collectParam: {}, |
| | | saveParam: this.saveParam(), |
| | | users: [], |
| | | |
| | | rules: { |
| | | processName: [ |
| | | { required: true, message: '模æ¿åç§°ä¸è½ä¸ºç©º', trigger: 'blur' }, |
| | | { min: 1, max: 20, message: 'é¿åº¦å¨ 3 å° 20 个å符', trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | this.apiInit() |
| | | this.apiDict() |
| | | }, |
| | | methods: { |
| | | saveParam() { |
| | | return { |
| | | modelName: this.parameter[this.parameterKeys.flowName], |
| | | processName: this.parameter[this.parameterKeys.flowTemplate], |
| | | topName: this.title, |
| | | ids: this.parameter[this.parameterKeys.ids], |
| | | } |
| | | }, |
| | | async apiInit() { |
| | | const response = await personnelInit({ type: this.type, templateId: this.code }) |
| | | const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code] }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.initFrom = response.data.data.user |
| | | this.tags = response.data.data.collect |
| | | const { modelKey, templateId } = response.data.data.flow |
| | | let flowTaskUsers = response.data.data.user |
| | | this.saveParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers } |
| | | this.collectParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers } |
| | | this.saveParam = { ...this.saveParam, modelKey, templateId } |
| | | this.handleClickTag(this.tags[0]) |
| | | } |
| | | }, |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | }).then(async ({ value }) => { |
| | | console.log(this.users) |
| | | this.saveParam.flowTaskUsers = this.users |
| | | this.saveParam = { ...this.saveParam, name: value } |
| | | console.log(this.saveParam) |
| | | const response = await personnelCollect(this.saveParam) |
| | | this.collectParam.flowTaskUsers = this.users |
| | | this.collectParam = { ...this.collectParam, name: value } |
| | | console.log(this.collectParam) |
| | | const response = await personnelCollect(this.collectParam) |
| | | if (response.status === 200) { |
| | | this.$nextTick(() => { |
| | | this.apiInit() |
| | |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.apiInit() |
| | | this.isCollent = true |
| | | this.$message({ |
| | | type: 'success', |
| | | message: response.data.msg |
| | |
| | | }, |
| | | async apiSave() { |
| | | try { |
| | | const { modelKey, templateId } = this.saveParam |
| | | const response = await personnelSave({ modelKey, templateId }) |
| | | const response = await personnelSave(this.saveParam) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: response.data.msg |
| | | }); |
| | | type: 'success', |
| | | message: response.data.msg |
| | | }); |
| | | this.done() |
| | | } |
| | | } catch { |
| | |
| | | handleClickTag(event) { |
| | | console.log(event) |
| | | const flowTaskUsers = event.flowTaskUsers |
| | | this.saveParam.flowTaskUsers = flowTaskUsers.map(item => { |
| | | this.collectParam.flowTaskUsers = flowTaskUsers.map(item => { |
| | | const { taskId, taskName, userId, userName } = item |
| | | return { taskId, taskName, userId, userName } |
| | | }) |
| | |
| | | handleSelect(event, index) { |
| | | const res = this.typeName.find(item => item.userId === event) |
| | | const { userName } = res |
| | | let users = { ... this.saveParam.flowTaskUsers[index], userName } |
| | | let users = { ... this.collectParam.flowTaskUsers[index], userName } |
| | | console.log(users) |
| | | this.users[index] = users |
| | | }, |
| | |
| | | this.done() |
| | | }, |
| | | handleConfirm() { |
| | | console.log(this.users) |
| | | console.log(this.saveParam) |
| | | this.apiSave() |
| | | } |
| | |
| | | import avueUeditor from 'avue-plugin-ueditor'; |
| | | import website from '@/config/website'; |
| | | import crudCommon from '@/mixins/crud'; |
| | | import Divider from './components/Divider'; |
| | | // ä¸å¡ç»ä»¶ |
| | | import tenantPackage from './views/system/tenantpackage'; |
| | | import enupackage from "@/views/modeling/enupackage"; |
| | |
| | | Vue.component('MasterTree',MasterTree) |
| | | Vue.component('FlowPath',FlowPath) |
| | | Vue.component('Stage',Stage) |
| | | Vue.component('Divider', Divider) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | <template>
|
| | | <div>
|
| | | <el-button @click="visible = true">æµè¯</el-button>
|
| | | <el-button @click="visible1 = true">ç¸ä¼¼é¡¹æ¥è¯¢</el-button>
|
| | | <FormTemplateDialog
|
| | | :visible.sync="visible"
|
| | | :type="this.type"
|
| | | :templateOid="this.templateOid"
|
| | | :codeClassifyOid="this.codeClassifyOid"
|
| | | :codeRuleOid="this.codeRuleOid"
|
| | | :disabledProp="disabledProp"
|
| | | :rowOid="rowOid"
|
| | | @submit="submit"
|
| | | ></FormTemplateDialog>
|
| | | <ResembleQueryDialog
|
| | | :visible.sync="visible1"
|
| | | :type="this.type"
|
| | | :templateOid="this.templateOid"
|
| | | :codeClassifyOid="this.codeClassifyOid"
|
| | | :codeRuleOid="this.codeRuleOid"
|
| | | ></ResembleQueryDialog>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import ResembleQueryDialog from '@/components/FormTemplate/ResembleQueryDialog.vue';
|
| | | export default {
|
| | | name: "FormTempalteTest",
|
| | | components: { ResembleQueryDialog },
|
| | | data() {
|
| | | return {
|
| | | visible: false,
|
| | | visible1: false,
|
| | | // é»è®¤ç¦ç¨ç表å
ç´
|
| | | disabledProp: ["id", 'lcstatus'],
|
| | | // 表åç±»å
|
| | | type: "add",
|
| | | templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F",
|
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
|
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
|
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9'
|
| | | };
|
| | | },
|
| | | methods: {
|
| | | submit(data) {
|
| | | console.log(data);
|
| | | }
|
| | | }
|
| | | };
|
| | | </script>
|
| | | <template> |
| | | <div> |
| | | <el-button @click="visible = true">æµè¯</el-button> |
| | | <el-button @click="visible1 = true">ç¸ä¼¼é¡¹æ¥è¯¢</el-button> |
| | | <el-button @click="visible2 = true">é件管çdialog</el-button> |
| | | <FormTemplateDialog |
| | | :visible.sync="visible" |
| | | :type="this.type" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | @submit="submit" |
| | | ></FormTemplateDialog> |
| | | <ResembleQueryDialog |
| | | :visible.sync="visible1" |
| | | :type="this.type" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | ></ResembleQueryDialog> |
| | | <fileInHtml :options="{}"></fileInHtml> |
| | | <fileinDialog |
| | | :visible="visible2" |
| | | :options="{}" |
| | | @close="visible2=false" |
| | | ></fileinDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ResembleQueryDialog from '@/components/FormTemplate/ResembleQueryDialog.vue'; |
| | | import fileInHtml from '@/components/file/inHtml.vue'; |
| | | import fileinDialog from '@/components/file/inDialog.vue'; |
| | | export default { |
| | | name: "FormTempalteTest", |
| | | components: { ResembleQueryDialog ,fileInHtml ,fileinDialog}, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | visible1: false, |
| | | visible2: false, |
| | | // é»è®¤ç¦ç¨ç表å
ç´ |
| | | disabledProp: ["id", 'lcstatus'], |
| | | // 表åç±»å |
| | | type: "add", |
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96", |
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9' |
| | | }; |
| | | }, |
| | | methods: { |
| | | submit(data) { |
| | | console.log(data); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | @tableHeadDataFateher="tableHeadDatas" |
| | | @total="totals" |
| | | @nodeClick="nodeClick" |
| | | @tableHeadFindData="tableHeadFindDatas" |
| | | ></master-tree> |
| | | </basic-container> |
| | | </el-aside> |
| | |
| | | :tableHeadDataFateher="this.tableHeadDataFateher" |
| | | :isLoading="isLoading" |
| | | :templateOid="templateOid" |
| | | :tableHeadFindData="tableHeadFindData" |
| | | ></TableCrud> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | tableHeadDataFateher:[], |
| | | total:"", |
| | | isLoading: false, |
| | | |
| | | tableHeadFindData:{} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | tableHeadDatas(val){ |
| | | this.tableHeadDataFateher=val |
| | | }, |
| | | tableHeadFindDatas(val){ |
| | | this.tableHeadFindData=val |
| | | }, |
| | | nodeClick(val){ |
| | | this.templateOid=val; |
| | | console.log('val',val) |
| | |
| | | <el-button @click="outerVisible = true">æµç¨æµè¯</el-button> |
| | | <el-button @click="handleTable">人å设置</el-button> |
| | | <flow-business :visible.sync="outerVisible"></flow-business> |
| | | <set-personnel :visible.sync="visibleFlow" code="8b5e2017-990f-454a-9c39-4c4eeeb57553" type="PUBLIC"></set-personnel> |
| | | <set-personnel :visible.sync="visibleFlow" :parameter="parameter" :parameter-keys="props" ></set-personnel> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | outerVisible: false, |
| | | visibleFlow: false, |
| | | |
| | | parameter:{ |
| | | ids:['0000','22222222'], |
| | | code:'8b5e2017-990f-454a-9c39-4c4eeeb57553', |
| | | type:'PUBLIC', |
| | | name:'模æ¿name', |
| | | template:'模æ¿template' |
| | | }, |
| | | props:{ |
| | | flowName:'name', |
| | | flowTemplate:'template', |
| | | type:'type', |
| | | ids:'ids', |
| | | code:'code' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://localhost:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://192.168.1.46:37000', |
| | | target: 'http://192.168.1.46:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.104:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | public class BaseModel implements Serializable { |
| | | @JsonSerialize( |
| | |
| | | private String secretGradeText; |
| | | |
| | | @TableField(exist = false) |
| | | private Map<String, String> data; |
| | | private Map<String, String> data = new HashMap<>(); |
| | | |
| | | public BaseModel() { |
| | | } |
| | |
| | | */ |
| | | Integer deleteByTaleAndOid(String tableName,String oids); |
| | | |
| | | /** |
| | | * ä¼ å
¥è¡¨åï¼nameoidè·åæ°ççæ¬å·ç |
| | | * @param tableName |
| | | * @param nameoid |
| | | * @return |
| | | */ |
| | | Map<String,Object> getNextRevision(@Param("tableName")String tableName,@Param("nameoid") String nameoid); |
| | | |
| | | } |
| | |
| | | * @param cboList æ°æ®çå
容 |
| | | */ |
| | | void batchSaveSelectChar(CodeClassifyTemplateVO templateVO, /*List<ClientBusinessObject> cboList*/ |
| | | List<String> cboList); |
| | | List<BaseModel> cboList); |
| | | |
| | | /** |
| | | * ä½¿ç¨æ¨¡æ¿ç主é®è·å表åçä¿¡æ¯ |
| | |
| | | * @param attrName 屿§çåå |
| | | * @return true 表示åºè¯¥å¿½ç¥ |
| | | */ |
| | | default boolean checkUnAttrUnEdit(String attrName){ |
| | | return (VciQueryWrapperForDO.OID_FIELD.equalsIgnoreCase(attrName) |
| | | ||"ts".equalsIgnoreCase(attrName) |
| | | || "lastmodifier".equalsIgnoreCase(attrName) |
| | | || "lastmodifytime".equalsIgnoreCase(attrName) |
| | | || "createtime".equalsIgnoreCase(attrName) |
| | | || "checkintime".equalsIgnoreCase(attrName) |
| | | ||"checkouttime".equalsIgnoreCase(attrName)); |
| | | } |
| | | boolean checkUnAttrUnEdit(String attrName); |
| | | // { |
| | | // return (VciQueryWrapperForDO.OID_FIELD.equalsIgnoreCase(attrName) |
| | | // ||"ts".equalsIgnoreCase(attrName) |
| | | // || "lastmodifier".equalsIgnoreCase(attrName) |
| | | // || "lastmodifytime".equalsIgnoreCase(attrName) |
| | | // || "createtime".equalsIgnoreCase(attrName) |
| | | // || "checkintime".equalsIgnoreCase(attrName) |
| | | // ||"checkouttime".equalsIgnoreCase(attrName)); |
| | | // } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.sun.corba.se.impl.orbutil.ObjectUtility; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.beans.BeanInfo; |
| | | import java.beans.IntrospectionException; |
| | | import java.beans.Introspector; |
| | | import java.beans.PropertyDescriptor; |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.math.BigDecimal; |
| | | import java.sql.SQLException; |
| | | import java.sql.Timestamp; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.ZonedDateTime; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.function.Supplier; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.DATA_OID_NOT_EXIST; |
| | |
| | | @Resource |
| | | ISysClient iSysClient; |
| | | /** |
| | | * ç³»ç»çæå¡ |
| | | * å¯çº§æå¡ |
| | | */ |
| | | @Resource |
| | | private IWebSecretClient secretService; |
| | |
| | | public void changeStatus(BaseModelDTO baseModelDTO) { |
| | | VciBaseUtil.alertNotNull(baseModelDTO, "æ°æ®ä¿¡æ¯", baseModelDTO.getOid(), "主é®", baseModelDTO.getBtmname(), "ä¸å¡ç±»å", baseModelDTO.getLcStatus(), "ç®æ ç¶æ"); |
| | | List<String> oids = VciBaseUtil.str2List(baseModelDTO.getOid()); |
| | | // List<ClientBusinessObject> cboList = boService.selectCBOByOidCollection(oids, baseModelDTO.getBtmname()); |
| | | // TODO æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("BTMNAME",baseModelDTO.getBtmname()); |
| | | wrapper.in("OID",oids); |
| | | // TODO å¾
å®å |
| | | //æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | // QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | List<BaseModel> baseModels = new ArrayList<>(); |
| | | baseModels = selectByTypeAndOid(baseModelDTO.getBtmname(), baseModelDTO.getOid()); |
| | | if(baseModels.size() == 0){ |
| | |
| | | // åæ¶éè¦ä¸å¡æ°æ®å é¤ |
| | | if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname())); |
| | | // String referTable = listR.getData().get(0).getTableName(); |
| | | commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(),VciBaseUtil.toInSql(baseModelDTO.getOid())); |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | |
| | | // TODO å¾
å®å |
| | | //btmTypeClient.deleteBatchIds(cboList); |
| | | |
| | | //boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | for (BaseModel baseModel : baseModels) { |
| | | baseModel.setLcStatus(baseModelDTO.getLcStatus()); |
| | |
| | | List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(),cboList); |
| | | |
| | | |
| | | List<String> charList = new ArrayList<>(); |
| | | for (BaseModel baseModel : cboList) { |
| | | charList.add(baseModel.getId()); |
| | | } |
| | | batchSaveSelectChar(templateVO, charList); |
| | | // List<String> charList = new ArrayList<>(); |
| | | // for (BaseModel baseModel : cboList) { |
| | | // charList.add(baseModel.getId()); |
| | | // } |
| | | batchSaveSelectChar(templateVO, cboList); |
| | | return codeList.size() > 0 ? codeList.get(0) : ""; |
| | | // return null; |
| | | } |
| | |
| | | } else if (StringUtils.isNotBlank(orderDTO.getCopyFromVersion())) { |
| | | sql[0] += " and oid != '" + orderDTO.getCopyFromVersion() + "'"; |
| | | } |
| | | sql[0] += " and islastR = '1' and islastV = '1' "; |
| | | sql[0] += " and lastR = '1' and lastV = '1' "; |
| | | // if (boService.queryCountBySql(sql[0], new HashMap<>()) > 0) { |
| | | if (Integer.parseInt(commonsMapper.selectById(sql[0]).get(0)) > 0) { |
| | | String ruleInfoMsg = keyRuleVO == null ? "" : "æ¥è¯¢è§åï¼å»é¤ç©ºæ ¼--{0},忽ç¥å¤§å°å--{1},忽ç¥å
¨åè§--{2},忽ç¥å
¨é¨ç©ºæ ¼--{3}"; |
| | |
| | | } |
| | | try { |
| | | String keyPrefix = BTM_INIT_CACHE.concat(StringPool.COLON).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
| | | // String finalBtmName = btmName; |
| | | Cache.ValueWrapper valueWrapper = CacheUtil.getCache(keyPrefix).get(keyPrefix.concat(String.valueOf(btmName))); |
| | | if(valueWrapper == null){ |
| | | CacheUtil.getCache(keyPrefix).put(keyPrefix.concat(String.valueOf(btmName)), createBaseModel(btmName)); |
| | |
| | | logger.error("å建ä¸å¡ç±»å对象",e); |
| | | throw new VciBaseException("initBtmError",new String[]{btmName}); |
| | | } |
| | | // String userName = AuthUtil.getUser().getUserName(); |
| | | // CodeWupin wupinEntity = new CodeWupin(); |
| | | // wupinEntity.setOid(VciBaseUtil.getPk()); |
| | | //// bo.setRevisionid((new ObjectUtility()).getNewObjectID36()); |
| | | //// bo.setNameoid((new ObjectUtility()).getNewObjectID36()); |
| | | // wupinEntity.setBtmname(btmName); |
| | | // wupinEntity.setLastR(String.valueOf(1)); |
| | | // wupinEntity.setFirstR(String.valueOf(1)); |
| | | // wupinEntity.setFirstV(String.valueOf(1)); |
| | | // wupinEntity.setLastV(String.valueOf(1)); |
| | | // wupinEntity.setCreator(userName); |
| | | // wupinEntity.setCreateTime(new Date()); |
| | | // wupinEntity.setLastModifier(userName); |
| | | // wupinEntity.setLastModifyTime(new Date()); |
| | | // wupinEntity.setRevisionRule("numberversionrule"); |
| | | // wupinEntity.setVersionRule("0"); |
| | | //// if(StringUtils.isNotBlank(btmTypeVO.getRevisionruleid())){ |
| | | // // |
| | | //// OsRevisionRuleVO revisionRuleVO = revisionRuleService.getRevisionRuleById(btmTypeVO.getRevisionruleid()); |
| | | // wupinEntity.setRevisionValue("1"); |
| | | //// } |
| | | // |
| | | // wupinEntity.setRevisionSeq(1); |
| | | // wupinEntity.setVersionSeq(1); |
| | | // //æä¸ªç¹ï¼éè¦é®åå¥çæ¬é®é¢ï¼å±ç¤ºé»è®¤ä¸º1 |
| | | // wupinEntity.setVersionValue("1"); |
| | | // wupinEntity.setLctid("wupinLC"); |
| | | // wupinEntity.setLcStatus("Editing"); |
| | | // wupinEntity.setId(""); |
| | | // wupinEntity.setName(""); |
| | | // wupinEntity.setDescription(""); |
| | | // wupinEntity.setOwner(userName); |
| | | // wupinEntity.setCheckinby(userName); |
| | | // wupinEntity.setCopyFromVersion(""); |
| | | // wupinEntity.setMaterialtype(1001); |
| | | // wupinEntity.setCaigouwl("true"); |
| | | // wupinEntity.setShifoupihaoguanli("true"); |
| | | // wupinEntity.setKucunwl("true"); |
| | | // wupinEntity.setXiaoshouwl("false"); |
| | | // wupinEntity.setPassing("true"); |
| | | |
| | | // this.initTypeAttributeValue(wupinEntity,btmTypeVO); |
| | | // return wupinEntity; |
| | | |
| | | |
| | | // return cbo; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void batchSaveSelectChar(CodeClassifyTemplateVO templateVO, /*List<ClientBusinessObject> cboList*/ |
| | | List<String> cboList) { |
| | | List<BaseModel> cboList) { |
| | | if (templateVO != null && !CollectionUtils.isEmpty(cboList)) { |
| | | //æ¯å¼æ¥çï¼æä»¥ç´æ¥å¾ªç¯ |
| | | List<CodeClassifyTemplateAttrVO> selectAttrVOs = templateVO.getAttributes().stream().filter(s -> StringUtils.isNotBlank(s.getLibraryIdentification())).collect(Collectors.toList()); |
| | |
| | | if (!CollectionUtils.isEmpty(selectAttrVOs)) { |
| | | // SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | selectAttrVOs.parallelStream().forEach(attrVO -> { |
| | | List<String> valuesList = cboList; |
| | | // cboList.parallelStream().forEach(cbo -> { |
| | | List<String> valuesList = new ArrayList<>(); |
| | | cboList.parallelStream().forEach(cbo -> { |
| | | // String value = cbo.get.getAttributeValue(attrVO.getId()); |
| | | // if (StringUtils.isNotBlank(value)) { |
| | | // valuesList.add(value); |
| | | // } |
| | | // }); |
| | | |
| | | //å°bean转为map,mybatisç»ä¸å¤ç |
| | | Map<String,String> map = null; |
| | | |
| | | // baseModels.stream().forEach(model-> { |
| | | try { |
| | | map = VciBaseUtil.convertBean2Map(cbo); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("ç±»å转æ¢é误ï¼" + e.getMessage()); |
| | | } |
| | | // }); |
| | | |
| | | String value = map.get(attrVO.getId()); |
| | | if (StringUtils.isNotBlank(value)) { |
| | | valuesList.add(value); |
| | | } |
| | | }); |
| | | if (!CollectionUtils.isEmpty(valuesList)) { |
| | | for (String s : valuesList) { |
| | | DictBiz dictBiz = new DictBiz(); |
| | |
| | | // CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | //æ¾ä¸å¡ç±»åï¼ç¶å使ç¨ä¸»é®å»è·åæ°æ®åºéçæ°æ® |
| | | // List<ClientBusinessObject> cbos = boService.queryCBO(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), WebUtil.getOidQuery(orderDTO.getOid())); |
| | | List<BaseModel> cbos = selectByTypeAndOid(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), orderDTO.getOid()); |
| | | |
| | | QueryWrapper<CodeWupin> btmWrapper = new QueryWrapper<>(); |
| | | btmWrapper.eq("OID",orderDTO.getOid()); |
| | | CodeWupin cbo = codeWupinMapper.selectOne(btmWrapper); |
| | | |
| | | if (CollectionUtils.isEmpty(cbos)) { |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | // QueryWrapper<CodeWupin> btmWrapper = new QueryWrapper<>(); |
| | | // btmWrapper.eq("OID",orderDTO.getOid()); |
| | | // CodeWupin cbo = codeWupinMapper.selectOne(btmWrapper); |
| | | BaseModel cbo = cbos.get(0); |
| | | // CodeClstemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | // CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(orderDTO.getCodeRuleOid()); |
| | | |
| | |
| | | cbo.setDescription(orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | try { |
| | | cbo.setDescription(orderDTO.getDescription()); |
| | | cbo.setDescription( StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | //// cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription()); |
| | | // cbo.setAttributeValue("name", orderDTO.getName()); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | cbo.setLastModifyTime(new Date()); |
| | | cbo.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeWupinMapper.updateById(cbo); |
| | | cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), Collections.singletonList(cbo)); |
| | | // codeWupinMapper.updateById(cbo); |
| | | // |
| | | // List<CodeWupinEntity> cboList = new ArrayList<>(); |
| | | // |
| | |
| | | // List<ClientBusinessObject> cboList = new ArrayList<>(); |
| | | // cboList.add(cbo); |
| | | // boService.persistenceBatch(batchCBO); |
| | | batchSaveSelectChar(templateVO, Arrays.asList(cbo.getId())); |
| | | batchSaveSelectChar(templateVO, Collections.singletonList(cbo)); |
| | | // batchSaveSelectChar(templateVO, Arrays.asList(cbo.getId())); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public R batchUpdateCode(List<CodeOrderDTO> orderDTOList) { |
| | | // VciBaseUtil.alertNotNull(orderDTOList,"ç¼ç ç³è¯·ç¸å
³ç屿§å
容"); |
| | | // orderDTOList.forEach(orderDTO -> { |
| | | // VciBaseUtil.alertNotNull(orderDTO, "ç¼ç ç³è¯·ç¸å
³ç屿§çå
容é½ä¸ºç©º", orderDTO.getOid(), "æ°æ®ä¸»é®", |
| | | // orderDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®"); |
| | | // }); |
| | | // Map<String, CodeOrderDTO> orderDTOMap = orderDTOList.stream().filter(orderDTO -> orderDTO != null && StringUtils.isNotBlank(orderDTO.getOid())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | // List<ClientBusinessObject> updateList = new ArrayList<>(); |
| | | // // åºè¯¥é½æ¯ä¸ä¸ªåç±»ä¸çä¸å¡æ°æ®ï¼æ¾ç¬¬ä¸æ¡çå°±è¡ |
| | | // CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTOList.get(0).getCodeClassifyOid()); |
| | | VciBaseUtil.alertNotNull(orderDTOList,"ç¼ç ç³è¯·ç¸å
³ç屿§å
容"); |
| | | orderDTOList.forEach(orderDTO -> { |
| | | VciBaseUtil.alertNotNull(orderDTO, "ç¼ç ç³è¯·ç¸å
³ç屿§çå
容é½ä¸ºç©º", orderDTO.getOid(), "æ°æ®ä¸»é®", |
| | | orderDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®"); |
| | | }); |
| | | Map<String, CodeOrderDTO> orderDTOMap = orderDTOList.stream().filter(orderDTO -> orderDTO != null && StringUtils.isNotBlank(orderDTO.getOid())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | List<BaseModel> updateList = new ArrayList<>(); |
| | | // åºè¯¥é½æ¯ä¸ä¸ªåç±»ä¸çä¸å¡æ°æ®ï¼æ¾ç¬¬ä¸æ¡çå°±è¡ |
| | | CodeClassifyFullInfoBO topClassifyFullInfo = classifyService.getClassifyFullInfo(orderDTOList.get(0).getCodeClassifyOid()); |
| | | // Map<String,String> cboOidMap = new HashMap<>(); |
| | | // if (CollectionUtils.isEmpty(orderDTOMap.keySet())){ |
| | | // throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | // } |
| | | if (CollectionUtils.isEmpty(orderDTOMap.keySet())){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | |
| | | List<BaseModel> cboList = selectByTypeAndOid(topClassifyFullInfo.getTopClassifyVO().getBtmtypeid(), VciBaseUtil.array2String(orderDTOMap.keySet().toArray(new String[0]))); |
| | | // cboOidMap.put("oid",QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(orderDTOMap.keySet().toArray(new String[0])) + ")"); |
| | | // List<ClientBusinessObject> cboList = boService.queryCBO(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), cboOidMap); |
| | | // if (CollectionUtils.isEmpty(cboList)){ |
| | | // throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | // } |
| | | if (CollectionUtils.isEmpty(cboList)){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // CodeClassifyTemplateVO firstTemplateVO = templateService.getObjectHasAttrByOid(orderDTOMap.values().stream().findFirst().get().getTemplateOid()); |
| | | // Map<String, ClientBusinessObject> cboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | // orderDTOMap.keySet().stream().forEach(oid -> { |
| | | // CodeOrderDTO orderDTO = orderDTOMap.get(oid); |
| | | // ClientBusinessObject cbo = cboMap.get(oid); |
| | | // if (!cbo.getTs().contains(VciDateUtil.date2Str(orderDTO.getTs(), VciDateUtil.DateTimeFormat))) { |
| | | // throw new VciBaseException("æ°æ®ä¸æ¯ææ°çï¼å¯è½ä»äººå·²ç»ä¿®æ¹ï¼è¯·å·æ°ååè¯"); |
| | | // } |
| | | // if (!CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(cbo.getLcStatus()) && !orderDTO.isEditInProcess()) { |
| | | // throw new VciBaseException("æ°æ®ä¸æ¯{0}çç¶æï¼ä¸å
许修æ¹", new String[]{CodeDefaultLC.EDITING.getText()}); |
| | | // } |
| | | // //1. 夿å¿
è¾é¡¹ |
| | | // CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | // checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | // //2.å
注å
¥ï¼åç»åï¼æåæ ¡éª |
| | | // switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | // //3.å¤çç»åè§åãç»åè§åä¸è½ä½¿ç¨ç¼ç ç屿§ï¼å 为ç¼ç ççæå¯è½æ¯éè¦å±æ§ç |
| | | // switchComponentAttrOnOrder(templateVO, orderDTO); |
| | | // //4.æ ¡éªè§å |
| | | // checkVerifyOnOrder(templateVO, orderDTO); |
| | | // //5.夿å
³é®å±æ§ |
| | | // checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO); |
| | | // //6.æ ¡éªæä¸¾çå
容æ¯å¦æ£ç¡® |
| | | // checkEnumOnOrder(templateVO, orderDTO); |
| | | // //7.å¤çæ¶é´æ ¼å¼ï¼å¨æ°æ®åºéé¢ä¸è®ºæ¯åç¬¦ä¸²è¿æ¯æ¥ææ ¼å¼ï¼é½ä½¿ç¨ç¸åçæ ¼å¼åå¨ |
| | | // switchDateAttrOnOrder(templateVO, orderDTO); |
| | | // //é»è®¤çå
容ä¸è½åï¼æä»¥åªéè¦æ·è´èªå®ä¹çç¸å
³å±æ§å³å¯ |
| | | // copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true); |
| | | // //ä¼ä¸ç åéå¢ç çä¸ä¿®æ¹ |
| | | // cbo.setDescription(orderDTO.getDescription()); |
| | | // cbo.setName(orderDTO.getName()); |
| | | Map<String, BaseModel> cboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | orderDTOMap.keySet().stream().forEach(oid -> { |
| | | CodeOrderDTO orderDTO = orderDTOMap.get(oid); |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyTemplateVO firstTemplateVO = templateService.getObjectHasAttrByOid(orderDTOMap.values().stream().findFirst().get().getTemplateOid()); |
| | | BaseModel cbo = cboMap.get(oid); |
| | | String code=cbo.getId(); |
| | | if (!cbo.getTs().toString().contains(orderDTO.getTs().toString())) { |
| | | throw new VciBaseException("æ°æ®ä¸æ¯ææ°çï¼å¯è½ä»äººå·²ç»ä¿®æ¹ï¼è¯·å·æ°ååè¯"); |
| | | } |
| | | if (!CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(cbo.getLcStatus()) && !orderDTO.isEditInProcess()) { |
| | | throw new VciBaseException("æ°æ®ä¸æ¯{0}çç¶æï¼ä¸å
许修æ¹", new String[]{CodeDefaultLC.EDITING.getText()}); |
| | | } |
| | | //1. 夿å¿
è¾é¡¹ |
| | | CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | //2.å
注å
¥ï¼åç»åï¼æåæ ¡éª |
| | | switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | //3.å¤çç»åè§åãç»åè§åä¸è½ä½¿ç¨ç¼ç ç屿§ï¼å 为ç¼ç ççæå¯è½æ¯éè¦å±æ§ç |
| | | switchComponentAttrOnOrder(templateVO, orderDTO); |
| | | //4.æ ¡éªè§å |
| | | checkVerifyOnOrder(templateVO, orderDTO); |
| | | //5.夿å
³é®å±æ§ |
| | | checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO); |
| | | //6.æ ¡éªæä¸¾çå
容æ¯å¦æ£ç¡® |
| | | checkEnumOnOrder(templateVO, orderDTO); |
| | | //7.å¤çæ¶é´æ ¼å¼ï¼å¨æ°æ®åºéé¢ä¸è®ºæ¯åç¬¦ä¸²è¿æ¯æ¥ææ ¼å¼ï¼é½ä½¿ç¨ç¸åçæ ¼å¼åå¨ |
| | | switchDateAttrOnOrder(templateVO, orderDTO); |
| | | //é»è®¤çå
容ä¸è½åï¼æä»¥åªéè¦æ·è´èªå®ä¹çç¸å
³å±æ§å³å¯ |
| | | copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true); |
| | | //ä¼ä¸ç åéå¢ç çä¸ä¿®æ¹ |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // try { |
| | | // cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription()); |
| | | // cbo.setAttributeValue("id",code); |
| | | cbo.setId(code); |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | // cbo.setAttributeValueWithNoCheck("description", StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | // cbo.setAttributeValue("name", orderDTO.getName()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // } catch (VCIError e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // batchCBO.getUpdateCbos().add(cbo); |
| | | // updateList.add(cbo); |
| | | // }); |
| | | updateList.add(cbo); |
| | | batchSaveSelectChar(firstTemplateVO, cboList); |
| | | }); |
| | | // boService.persistenceBatch(batchCBO); |
| | | // batchSaveSelectChar(firstTemplateVO, cboList); |
| | | updateBatchByBaseModel(topClassifyFullInfo.getTopClassifyVO().getBtmtypeid(),updateList); |
| | | return R.success("æä½æåï¼"); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void upSaveCode(CodeOrderDTO orderDTO) { |
| | | VciBaseUtil.alertNotNull(orderDTO, "ç¼ç æ°æ®æå¨ä¸å¡ç±»åç§°", orderDTO.getBtmname()); |
| | | String btmName=orderDTO.getBtmname(); |
| | | //æ¾ä¸å¡ç±»åï¼ç¶å使ç¨ä¸»é®å»è·åæ°æ®åºéçæ°æ® |
| | | List<BaseModel> cbos = selectByTypeAndOid(btmName, orderDTO.getCopyFromVersion()); |
| | | if (CollectionUtils.isEmpty(cbos)) { |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | BaseModel oldCbo = cbos.get(0); |
| | | |
| | | if (!CodeDefaultLC.RELEASED.getValue().equalsIgnoreCase(oldCbo.getLcStatus())) { |
| | | throw new VciBaseException("æ°æ®ä¸æ¯{0}çç¶æï¼ä¸å
è®¸æ°æ®æ´æ¹", new String[]{CodeDefaultLC.RELEASED.getText()}); |
| | | } |
| | | |
| | | //æ ¹æ®æ°æ®è·ååç±»oid |
| | | String codeClassifyOid=oldCbo.getData().get(CODE_CLASSIFY_OID_FIELD.toUpperCase()); |
| | | orderDTO.setCodeClassifyOid(codeClassifyOid); |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyTemplateVO templateVO= this.getUsedTemplateByClassifyOid(orderDTO.getCodeClassifyOid()); |
| | | orderDTO.setTemplateOid(templateVO.getOid()); |
| | | VciBaseUtil.alertNotNull(orderDTO, "ç¼ç ç³è¯·ç¸å
³ç屿§çå
容为空", orderDTO.getCopyFromVersion(), "åå§æ°æ®ç主é®", |
| | | orderDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®"); |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | //æ¾ä¸å¡ç±»åï¼ç¶å使ç¨ä¸»é®å»è·åæ°æ®åºéçæ°æ® |
| | | // List<ClientBusinessObject> cbos = boService.queryCBO(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), WebUtil.getOidQuery(orderDTO.getCopyFromVersion())); |
| | | // if (CollectionUtils.isEmpty(cbos)) { |
| | | // throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | // } |
| | | // ClientBusinessObject oldCbo = cbos.get(0); |
| | | // if (!CodeDefaultLC.RELEASED.getValue().equalsIgnoreCase(oldCbo.getLcStatus())) { |
| | | // throw new VciBaseException("æ°æ®ä¸æ¯{0}çç¶æï¼ä¸å
è®¸æ°æ®æ´æ¹", new String[]{CodeDefaultLC.RELEASED.getText()}); |
| | | // } |
| | | // //éè¦åç |
| | | |
| | | //éè¦åç |
| | | // ClientBusinessObjectOperation cboOperation = new ClientBusinessObjectOperation(); |
| | | // ClientBusinessObject cbo = null; |
| | | BaseModel cbo = null; |
| | | // try { |
| | | // //cbo = cboOperation.createBusinessObjectVersion(oldCbo,VciBaseUtil.getCurrentUserId()); |
| | | // cbo = cboOperation.reviseBusinessObject(oldCbo, ""); |
| | | cbo = reviseBusinessObject(oldCbo); |
| | | // } catch (VCIError e) { |
| | | // throw new VciBaseException("åå§åç¸å
³çå
容åºç°äºé误", new String[0], e); |
| | | // } |
| | | // //1. 夿å¿
è¾é¡¹ |
| | | // CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | // checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | // //2.å
注å
¥ï¼åç»åï¼æåæ ¡éª |
| | | // switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | // //3.å¤çç»åè§åãç»åè§åä¸è½ä½¿ç¨ç¼ç ç屿§ï¼å 为ç¼ç ççæå¯è½æ¯éè¦å±æ§ç |
| | | // switchComponentAttrOnOrder(templateVO, orderDTO); |
| | | // //4.æ ¡éªè§å |
| | | // checkVerifyOnOrder(templateVO, orderDTO); |
| | | // //5.夿å
³é®å±æ§ |
| | | // checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO); |
| | | // //6.æ ¡éªæä¸¾çå
容æ¯å¦æ£ç¡® |
| | | // checkEnumOnOrder(templateVO, orderDTO); |
| | | // //7.å¤çæ¶é´æ ¼å¼ï¼å¨æ°æ®åºéé¢ä¸è®ºæ¯åç¬¦ä¸²è¿æ¯æ¥ææ ¼å¼ï¼é½ä½¿ç¨ç¸åçæ ¼å¼åå¨ |
| | | // switchDateAttrOnOrder(templateVO, orderDTO); |
| | | // //é»è®¤çå
容ä¸è½åï¼æä»¥åªéè¦æ·è´èªå®ä¹çç¸å
³å±æ§å³å¯ |
| | | // copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true); |
| | | // //ä¼ä¸ç åéå¢ç çä¸ä¿®æ¹ |
| | | // cbo.setDescription(orderDTO.getDescription()); |
| | | // cbo.setName(orderDTO.getName()); |
| | | //1. 夿å¿
è¾é¡¹ |
| | | //CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | //2.å
注å
¥ï¼åç»åï¼æåæ ¡éª |
| | | switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | //3.å¤çç»åè§åãç»åè§åä¸è½ä½¿ç¨ç¼ç ç屿§ï¼å 为ç¼ç ççæå¯è½æ¯éè¦å±æ§ç |
| | | switchComponentAttrOnOrder(templateVO, orderDTO); |
| | | //4.æ ¡éªè§å |
| | | checkVerifyOnOrder(templateVO, orderDTO); |
| | | //5.夿å
³é®å±æ§ |
| | | checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO); |
| | | //6.æ ¡éªæä¸¾çå
容æ¯å¦æ£ç¡® |
| | | checkEnumOnOrder(templateVO, orderDTO); |
| | | //7.å¤çæ¶é´æ ¼å¼ï¼å¨æ°æ®åºéé¢ä¸è®ºæ¯åç¬¦ä¸²è¿æ¯æ¥ææ ¼å¼ï¼é½ä½¿ç¨ç¸åçæ ¼å¼åå¨ |
| | | switchDateAttrOnOrder(templateVO, orderDTO); |
| | | //é»è®¤çå
容ä¸è½åï¼æä»¥åªéè¦æ·è´èªå®ä¹çç¸å
³å±æ§å³å¯ |
| | | copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true); |
| | | //ä¼ä¸ç åéå¢ç çä¸ä¿®æ¹ |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // try { |
| | | // cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription()); |
| | | // cbo.setAttributeValue("name", orderDTO.getName()); |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | // cbo.setAttributeValueWithNoCheck("description", StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // } catch (VCIError e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // //æ°æ®çæ¶åï¼ç¼ç æ¯ä¸åç |
| | | // cbo.setCreateTime(DateUtils.convert2String(new Date(Long.parseLong(cbo.getCreateTime())), "yyyy-MM-dd HH:mm:ss")); |
| | | // cbo.setLastModifyTime(DateUtils.convert2String(new Date(Long.parseLong(cbo.getLastModifyTime())), "yyyy-MM-dd HH:mm:ss")); |
| | | //æ°æ®çæ¶åï¼ç¼ç æ¯ä¸åç |
| | | cbo.setCreateTime(cbo.getCreateTime()); |
| | | cbo.setLastModifyTime(cbo.getLastModifyTime()); |
| | | // List<ClientBusinessObject> cboList = new ArrayList<>(); |
| | | // cboList.add(cbo); |
| | | // try { |
| | | try { |
| | | // cboOperation.saveRevisionBuinessObject(cbo); |
| | | // } catch (VCIError vciError) { |
| | | // throw new VciBaseException("æ°æ®æ´æ¹ä¿ååºéäº", new String[0], vciError); |
| | | // } |
| | | // batchSaveSelectChar(templateVO, cboList); |
| | | insertBatchByType(cbo.getBtmname(), Collections.singletonList(cbo)); |
| | | } catch (Exception vciError) { |
| | | throw new VciBaseException("æ°æ®æ´æ¹ä¿ååºéäº", new String[0], vciError); |
| | | } |
| | | batchSaveSelectChar(templateVO, Collections.singletonList(cbo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | return "pl_code_"+refertype.trim().toLowerCase(); |
| | | } |
| | | |
| | | public BaseModel reviseBusinessObject(BaseModel fromBo) { |
| | | BaseModel toBo = new BaseModel(); |
| | | // Map<String,String> data = new HashMap<>(); |
| | | // toBo.getData().put(data); |
| | | toBo.setOid(VciBaseUtil.getPk()); |
| | | toBo.setRevisionOid(VciBaseUtil.getPk()); |
| | | toBo.setNameOid(fromBo.getNameOid()); |
| | | toBo.setBtmname(fromBo.getBtmname()); |
| | | toBo.setLastR(String.valueOf(1)); |
| | | toBo.setFirstR(String.valueOf(0)); |
| | | toBo.setFirstV(String.valueOf(1)); |
| | | toBo.setLastV(String.valueOf(1)); |
| | | toBo.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | toBo.setCreateTime(new Date()); |
| | | toBo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | toBo.setLastModifyTime(new Date()); |
| | | toBo.setRevisionRule(fromBo.getRevisionRule()); |
| | | toBo.setVersionRule(fromBo.getVersionRule()); |
| | | // RevisionValueObject rvObj = this.getNextRevision(fromBo.getBtmName(), fromBo.getNameoid(), item.revRuleName, item.revInput, revisionVal); |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname())); |
| | | Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid()); |
| | | toBo.setRevisionSeq(Integer.parseInt(nextRevision.get("REVISIONSEQ").toString())); |
| | | toBo.setRevisionValue(nextRevision.get("REVISIONVAL").toString()); |
| | | // VersionValueObject versionObj = this.getVersionValue(item.verRuleName); |
| | | toBo.setVersionSeq(Integer.valueOf(nextRevision.get("VERSIONSEQ").toString())); |
| | | toBo.setVersionValue(nextRevision.get("VERSIONVAL").toString()); |
| | | toBo.setLctid(fromBo.getLctid()); |
| | | toBo.setLcStatus("Editing"); |
| | | toBo.setId(fromBo.getId()); |
| | | toBo.setName(fromBo.getName()); |
| | | toBo.setDescription(fromBo.getDescription()); |
| | | toBo.setOwner(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | // toBo.setCheckinBy(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | toBo.setCopyFromVersion(fromBo.getOid()); |
| | | toBo.getData().putAll(fromBo.getData()); |
| | | toBo.getData().put("CHECKINBY",String.valueOf(AuthUtil.getUser().getUserId())); |
| | | // this.initRevisionTypeAttributeValue(fromBo, toBo); |
| | | return toBo; |
| | | |
| | | } |
| | | } |
| | |
| | | if (isExport||newErrorMap.size() > 0) { |
| | | createRedisDatas(uuid + "-ok", templateVO, rowIndexCboMap, dataSet, fieldIndexMap, newErrorMap, true); |
| | | } else { |
| | | List<String> dataCBOIdList=new ArrayList<>(); |
| | | List<BaseModel> dataCBOIdList=new ArrayList<>(); |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | List<ClientBusinessObject> finalNeedSaveCboList = needSaveCboList; |
| | | CodeClassifyTemplateVO finalTemplateVO = templateVO; |
| | |
| | | BeanUtil.convert(clientBusinessObject,baseModel); |
| | | baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject)); |
| | | dataCBOList.add(baseModel); |
| | | dataCBOIdList.add(baseModel.getOid()); |
| | | dataCBOIdList.add(baseModel); |
| | | }); |
| | | |
| | | if (!CollectionUtils.isEmpty(thisCbos)) { |
| | |
| | | try { |
| | | codeList = productCodeService.productCodeAndSaveData(classifyFullInfo,templateVO,ruleVO, orderDTO.getSecDTOList(),dataCBOList); |
| | | //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | engineService.batchSaveSelectChar(templateVO, dataCBOIdList); |
| | | engineService.batchSaveSelectChar(templateVO, dataCBOList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("æ¹äºç³è¯·æ¶å¤±è´¥"); |
| | |
| | | |
| | | @Override |
| | | public R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot) { |
| | | List<String> allNeedSaveCboList=new ArrayList<>(); |
| | | List<BaseModel> dataCBOList=new ArrayList<>(); |
| | | codeImprotSaveDatVOList.stream().forEach(codeImprotSaveDatVO -> { |
| | | List<SheetRowData> rowDataList = new ArrayList<>(); |
| | | List<ClientBusinessObject>cboList=new ArrayList<>(); |
| | |
| | | |
| | | log.info("åç±»ï¼"+classifyFullInfo.getCurrentClassifyVO().getName()+"æ°æ®:"+needSaveCboList.size()); |
| | | if (!CollectionUtils.isEmpty(needSaveCboList)) { |
| | | List<BaseModel> dataCBOList=new ArrayList<>(); |
| | | // List<BaseModel> dataCBOList=new ArrayList<>(); |
| | | needSaveCboList.stream().forEach(clientBusinessObject -> { |
| | | BaseModel baseModel=new BaseModel(); |
| | | BeanUtil.convert(clientBusinessObject,baseModel); |
| | | baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject)); |
| | | dataCBOList.add(baseModel); |
| | | allNeedSaveCboList.add(baseModel.getOid()); |
| | | // allNeedSaveCboList.add(baseModel); |
| | | }); |
| | | try { |
| | | //9.æä»¬å¤çä¸å¡æ°æ® |
| | |
| | | } |
| | | } |
| | | //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | engineService.batchSaveSelectChar(codeClassifyTemplateVO, allNeedSaveCboList); |
| | | engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList); |
| | | }); |
| | | return R.success(isImprot?"æ¹éåå²å¯¼å
¥æå":"æ¹éç³è¯·æå"); |
| | | } |
| | |
| | | try { |
| | | productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList); |
| | | //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | engineService.batchSaveSelectChar(templateVO, allNeedSaveCboList); |
| | | engineService.batchSaveSelectChar(templateVO, dataCBOList); |
| | | // if(!isProcess){ |
| | | needSaveCboList.stream().forEach(needSaveCbo->{ |
| | | XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO(); |
| | |
| | | END; |
| | | </update > |
| | | |
| | | <select id="getNextRevision" resultType="map" > |
| | | select max(revisionSeq) + 1 revisionSeq, |
| | | max(RevisionValue) + 1 revisionVal, |
| | | max(VersionSeq) + 1 VersionSeq, |
| | | max(VersionValue) + 1 VersionVal |
| | | from ${tableName} |
| | | where nameoid = #{nameoid} |
| | | </select> |
| | | |
| | | </mapper> |