Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
| | |
| | | /tests/e2e/videos/ |
| | | /tests/e2e/screenshots/ |
| | | |
| | | |
| | | # local env files |
| | | .env.local |
| | | .env.*.local |
| | |
| | | data
|
| | | })
|
| | | }
|
| | | // è·åçå½å¨æäºä»¶
|
| | | export const getEventList = (params) => {
|
| | | return request({
|
| | | url: '/api/ubcs-omd/lifeCycle/page-event',
|
| | | method: 'get',
|
| | | params
|
| | | })
|
| | | }
|
| | | export default {
|
| | | getList,
|
| | | add,
|
| | | detail,
|
| | | del,
|
| | | edit
|
| | | edit,
|
| | | getEventList
|
| | | }
|
| | |
| | | title: "æ¥ç详ç»ä¿¡æ¯",
|
| | | setForm: {},
|
| | | },
|
| | | batchApplyCodeTableData: {},
|
| | | batchSelectTableData: {},
|
| | | savedList: [],
|
| | | tab1Loading: false,
|
| | | tab2Loading: false,
|
| | |
| | | if (first === true) {
|
| | | this.codeRuleOid = data.codeRuleOid;
|
| | | // ç¬¬ä¸æ¬¡æå¼ç´æ¥èµå¼ä¸æ ¡éª
|
| | | this.batchApplyCodeTableData[data.codeRuleOid] = {
|
| | | this.batchSelectTableData[data.codeRuleOid] = {
|
| | | name: data.name,
|
| | | templateOid: data.oid,
|
| | | cloNamesList: data.cloNamesList,
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | if (!this.batchApplyCodeTableData[data.codeRuleOid]) {
|
| | | this.batchApplyCodeTableData[data.codeRuleOid] = {
|
| | | if (!this.batchSelectTableData[data.codeRuleOid]) {
|
| | | this.batchSelectTableData[data.codeRuleOid] = {
|
| | | name: data.name,
|
| | | templateOid: data.oid,
|
| | | cloNamesList: data.cloNamesList,
|
| | |
| | | codeRuleOid: data.codeRuleOid,
|
| | | };
|
| | | }
|
| | | }
|
| | | if (this.type === 'historyImport') {
|
| | | if (first === true) {
|
| | | // ç¬¬ä¸æ¬¡æå¼ç´æ¥èµå¼ä¸æ ¡éª
|
| | | this.batchSelectTableData[data.codeClassifyOid] = {
|
| | | name: data.name,
|
| | | templateOid: data.oid,
|
| | | cloNamesList: data.cloNamesList,
|
| | | codeClassifyOid: data.codeClassifyOid,
|
| | | codeRuleOid: data.codeRuleOid,
|
| | | };
|
| | | // 䏿¯ç¬¬ä¸æ¬¡æå¼éè¦ä¼å
æ ¡éª
|
| | | }else if (this.localCodeClassifyOid === data.codeClassifyOid) {
|
| | | console.log("éå¤ç¹å»");
|
| | | }
|
| | | if (!this.batchSelectTableData[data.codeClassifyOid]) {
|
| | | this.batchSelectTableData[data.codeClassifyOid] = {
|
| | | name: data.name,
|
| | | templateOid: data.oid,
|
| | | cloNamesList: data.cloNamesList,
|
| | | codeClassifyOid: data.codeClassifyOid,
|
| | | tab1Selected: []
|
| | | };
|
| | | }
|
| | | this.selection = this.batchSelectTableData[this.localCodeClassifyOid]['tab1Selected']
|
| | | }
|
| | | this.localCodeClassifyOid = data.codeClassifyOid;
|
| | | this.cloNamesList = data.cloNamesList;
|
| | |
| | | (item) => !this.savedList.includes(item.oid)
|
| | | );
|
| | | if (this.type === "batchApplyCode") {
|
| | | this.batchApplyCodeTableData[data.codeRuleOid]["tab1"] =
|
| | | this.batchSelectTableData[data.codeRuleOid]["tab1"] =
|
| | | this.tab1Table;
|
| | | }
|
| | | if (this.type === "historyImport") {
|
| | | this.batchSelectTableData[data.codeClassifyOid]["tab1"] =
|
| | | this.tab1Table;
|
| | | }
|
| | | });
|
| | |
| | | this.tab2Loading = false
|
| | | this.tab2Table = res.data.data;
|
| | | if (this.tab2Table.length > 0 && this.type === "batchApplyCode") {
|
| | | this.batchApplyCodeTableData[data.codeRuleOid]["codeApply"] = {};
|
| | | this.batchApplyCodeTableData[data.codeRuleOid]["tab2"] =
|
| | | res.data.data;
|
| | | this.batchSelectTableData[data.codeRuleOid]["codeApply"] = {};
|
| | | this.batchSelectTableData[data.codeRuleOid]["tab2"] =
|
| | | this.tab2Table
|
| | | if (this.$refs.CodeApply) {
|
| | | this.$refs.CodeApply.loading = true;
|
| | | }
|
| | | this.getCodeRule();
|
| | | }
|
| | | if (this.type === "historyImport") {
|
| | | this.batchSelectTableData[data.codeClassifyOid]["tab2"] =
|
| | | this.tab2Table
|
| | | }
|
| | | });
|
| | | getFormTemplate({
|
| | |
| | | },
|
| | | tab1TableSelectChange(selection) {
|
| | | this.selectedTab1Table = selection;
|
| | | if (this.batchSelectTableData[this.localCodeClassifyOid]) {
|
| | | this.batchSelectTableData[this.localCodeClassifyOid]['tab1Selected'] = selection
|
| | | }
|
| | | },
|
| | | resembleRowChange(row) {
|
| | | if (!row || !row.oid) {
|
| | |
| | | return false;
|
| | | }
|
| | | }
|
| | | let lookedCodeRuleOidList = Object.keys(this.batchApplyCodeTableData);
|
| | | let lookedCodeRuleOidList = Object.keys(this.batchSelectTableData);
|
| | | let noLookCodeRuleOidList = this.leftTree.filter(
|
| | | (item) => !lookedCodeRuleOidList.includes(item.codeRuleOid)
|
| | | );
|
| | |
| | | }
|
| | | let errorData = [];
|
| | | let successData = [];
|
| | | for (const key in this.batchApplyCodeTableData) {
|
| | | if (Object.hasOwnProperty.call(this.batchApplyCodeTableData, key)) {
|
| | | const element = this.batchApplyCodeTableData[key];
|
| | | for (const key in this.batchSelectTableData) {
|
| | | if (Object.hasOwnProperty.call(this.batchSelectTableData, key)) {
|
| | | const element = this.batchSelectTableData[key];
|
| | | if (element.tab1.length > 0) {
|
| | | errorData.push(element);
|
| | | }
|
| | |
| | | },
|
| | | };
|
| | | });
|
| | | } else if (this.type === 'historyImport') {
|
| | | let lookedCodeRuleOidList = Object.keys(this.batchSelectTableData);
|
| | | let noLookCodeRuleOidList = this.leftTree.filter(
|
| | | (item) => !lookedCodeRuleOidList.includes(item.codeClassifyOid)
|
| | | );
|
| | | let noLookName = noLookCodeRuleOidList.map((item) => item.name);
|
| | | if (noLookName.length > 0) {
|
| | | this.$message.warning(`æ°æ®${noLookName}è¿æªæ¾æ¥çï¼è¯·å
æ¥çï¼`);
|
| | | return false;
|
| | | }
|
| | | params.codeImprotSaveDatVOList = this.batchSelectTableData.map(item => {
|
| | | return {
|
| | | Clos: item.cloNamesList,
|
| | | dataList: item.tab2.concat(item.tab1Selected),
|
| | | orderDTO: {
|
| | | codeClassifyOid: item.codeClassifyOid,
|
| | | templateOid: item.templateOid,
|
| | | secDTOList: this.secDTOList,
|
| | | },
|
| | | }
|
| | | })
|
| | | } else {
|
| | | params.codeImprotSaveDatVOList = [
|
| | | {
|
| | |
| | | this.submitLoading = true
|
| | | submitHistoryimport(params).then((res) => {
|
| | | this.submitLoading = false
|
| | | console.log(res);
|
| | | if (res.data.code === 200) {
|
| | | this.$message.success(res.data.msg);
|
| | | }
|
| | |
| | | },
|
| | | // éæ°ç¼è¾
|
| | | reEdit(row) {
|
| | | console.log(row, "row");
|
| | | this.currentSelectedResembleRow = {
|
| | | templateOid: row.codetemplateoid,
|
| | | codeClassifyOid: row.codeclassifyid,
|
| | |
| | | // ç´æ¥ç¼è¾åä¿å
|
| | | FormTemplateSubmit(form) {
|
| | | addSaveCode(form).then((res) => {
|
| | | console.log(res);
|
| | | if (res.data.code === 200) {
|
| | | this.savedList.push(form.oid);
|
| | | this.$message.success("æ°å¢æåï¼");
|
| | |
| | | :type="edit" |
| | | :visible.sync="DataVisible"></FormTemplateDialog> |
| | | <!-- åå¸--> |
| | | <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow"></set-personnel> |
| | | <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow" :title="title"></set-personnel> |
| | | <!-- åç¨--> |
| | | <set-personnel :parameter="this.parameter" :visible.sync="visibleDeactivate" :title="title"></set-personnel> |
| | | <!-- å¯ç¨--> |
| | | <set-personnel :parameter="this.parameter" :visible.sync="visibleEnable" :title="title"></set-personnel> |
| | | <!-- åæ¶--> |
| | | <set-personnel :parameter="this.parameter" :visible.sync="visibleRecovery" :title="title"></set-personnel> |
| | | <!-- é«çº§æ¥è¯¢--> |
| | | <advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query> |
| | | |
| | | <integration-transfer :data="transferData" :props="transferProps" :visible.sync="dialogPush" |
| | | @save="handelTransferSave"></integration-transfer> |
| | | <!-- 导åº--> |
| | | <MasterTransfer :visible.sync="dialogPush" :tableHeadData="tableHeadFindData" :codeClassifyOid="codeClassifyOid" :tableData="tableData"></MasterTransfer> |
| | | <!-- ç¸ä¼¼é¡¹--> |
| | | <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid" |
| | | :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog> |
| | | |
| | | <div class="block" style="display: flex; justify-content: flex-end"> |
| | | <el-pagination :current-page="page.currentPage" :page-size="page.pageSizes" :page-sizes="page.pageSizes" |
| | | :total="page.total" layout="total, sizes, prev, pager, next, jumper" |
| | |
| | | parameter: { |
| | | ids: [], |
| | | code: "", |
| | | type: "PUBLIC", |
| | | type: '', |
| | | // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC' |
| | | template: "", |
| | | vars: { |
| | | codeClassifyOid: "", |
| | |
| | | } |
| | | }, |
| | | visibleNames:[], |
| | | //åå¸ |
| | | visibleFlow: false, |
| | | //åç¨ |
| | | visibleDeactivate:false, |
| | | //å¯ç¨ |
| | | visibleEnable:false, |
| | | //åæ¶ |
| | | visibleRecovery:false, |
| | | title:'', |
| | | transferData: [], |
| | | transferProps: { |
| | | key: "oid", |
| | |
| | | this.$refs.dataTable.doLayout() |
| | | } |
| | | }, |
| | | // åå¸ |
| | | setHandler() { |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } else { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | this.visibleFlow = true; |
| | | } |
| | | }, |
| | | openVis(visible) { |
| | | console.log(visible) |
| | | this[visible] = true |
| | |
| | | // if(uniqueFlag === 'CODEEDIT') return this.openBatchImport('batchApplyCode') |
| | | if (uniqueFlag === 'CODESTARTPROCESS') return this.setHandler() |
| | | if (uniqueFlag === 'CODEUPREVISION') return this.DataChange() |
| | | if (uniqueFlag === 'CODERECYCLE') return this.huishouHandler() |
| | | if (uniqueFlag === 'CODEEXPORT') return this.openD() |
| | | if (uniqueFlag === 'CODEQUERY') return this.findHandler() |
| | | //åç¨ |
| | | if (uniqueFlag === 'CODEDISABLE') return this.Deactivate() |
| | | //å¯ç¨ |
| | | if (uniqueFlag === 'CODEENABLE') return this.Enable() |
| | | //åæ¶ |
| | | if (uniqueFlag === 'CODERECYCLE') return this.Recovery() |
| | | // ç¸ä¼¼é¡¹æ¥è¯¢ |
| | | // if(uniqueFlag === 'CODEEDIT') return this.similarHandler() |
| | | }); |
| | |
| | | rend() { |
| | | this.tableData = this.tableHeadData; |
| | | }, |
| | | // åå¸ |
| | | setHandler() { |
| | | // let EditFlag1=false |
| | | // let EditFlag2=false |
| | | // if(EditFlag1){ |
| | | // this.$message.warning('åªæç¶ææ¯ãç¼è¾ä¸ãçæ°æ®æå¯ä»¥åèµ·æµç¨') |
| | | // }else if(EditFlag2){ |
| | | // this.$message.warning('æ¨éæ©çæ°æ®å
¨é¨ä¸ºãç¼è¾ä¸ãæå¯ä»¥åèµ·æµç¨') |
| | | // } |
| | | this.selectRow.forEach(item=>{ |
| | | if(this.selectRow.length === 1 && item.lcstatus !== "Editing"){ |
| | | this.$message.warning('åªæç¶ææ¯ãç¼è¾ä¸ãçæ°æ®æå¯ä»¥åèµ·æµç¨') |
| | | }else if(item.lcstatus !== 'Editing'){ |
| | | this.$message.warning('æ¨éæ©çæ°æ®å
¨é¨ä¸ºãç¼è¾ä¸ãæå¯ä»¥åèµ·æµç¨') |
| | | }else { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | this.parameter.type='PUBLIC' |
| | | this.title='æµç¨å®¡æ¹' |
| | | this.visibleFlow = true; |
| | | } |
| | | }) |
| | | // if (this.selectRow.length <= 0) { |
| | | // this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | // } else { |
| | | // this.userName = localStorage.getItem("username"); |
| | | // this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | // this.parameter.type='PUBLIC' |
| | | // this.title='æµç¨å®¡æ¹' |
| | | // this.visibleFlow = true; |
| | | // } |
| | | }, |
| | | //åç¨ |
| | | Deactivate(){ |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } else { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | this.parameter.type='DISABLE' |
| | | this.title='åç¨ï¼å»ç»ï¼ç¼ç æ°æ®' |
| | | this.visibleDeactivate=true; |
| | | } |
| | | }, |
| | | //å¯ç¨ |
| | | Enable(){ |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } else { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | this.parameter.type='ENABLE' |
| | | this.title='å¯ç¨ï¼è§£å»ï¼ç¼ç æ°æ®' |
| | | this.visibleEnable=true; |
| | | } |
| | | }, |
| | | //åæ¶ |
| | | Recovery(){ |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } else { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; |
| | | this.parameter.type='ROLLBACK' |
| | | this.title='åæ¶ç¼ç æ°æ®' |
| | | this.visibleRecovery=true; |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.isLoading = true; |
| | | setTimeout(() => { |
| | |
| | | this.form |
| | | ); |
| | | } |
| | | if (resembleQueryList.length === 0) { |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues( |
| | | this.form |
| | | ); |
| | | const noData = [ |
| | | "jiliangdwname", |
| | | "materialtypeText", |
| | | "morengongysname", |
| | | "$caigouwl", |
| | | "$xiaoshouwl", |
| | | "$shifoupihaoguanli", |
| | | "lcstatus_text", |
| | | "hesuanfenleiname", |
| | | "$kucunwl", |
| | | ]; |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = []; |
| | | for (const key in this.codeApplyForm) { |
| | | if (Object.hasOwnProperty.call(this.codeApplyForm, key)) { |
| | | const value = this.codeApplyForm[key]; |
| | | if (value) { |
| | | resForm.secDTOList.push({ secOid: key, secValue: value }); |
| | | } |
| | | } |
| | | } |
| | | resForm.codeClassifyOid = this.codeClassifyOid; |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | this.$emit("submit", resForm); |
| | | } else { |
| | | this.$confirm( |
| | | if (resembleQueryList.length > 0) { |
| | | await this.$confirm( |
| | | `è¯¥ç©æå·²æ${resembleQueryList.length}æ¡ç¸ä¼¼æ°æ®ï¼æ¯å¦ç»§ç»ä¿åï¼`, |
| | | "éè¦æ¨ç¡®è®¤", |
| | | { |
| | |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // æé¤ä¸äºå段 |
| | | const noData = [ |
| | | "jiliangdwname", |
| | | "materialtypeText", |
| | | "morengongysname", |
| | | "$caigouwl", |
| | | "$xiaoshouwl", |
| | | "$shifoupihaoguanli", |
| | | "lcstatus_text", |
| | | "hesuanfenleiname", |
| | | "$kucunwl", |
| | | ]; |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = |
| | | this.getDefaultValueAndFormValues(this.form); |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = this.secVOList.map((item) => { |
| | | return { |
| | | secOid: item.oid, |
| | | secValue: this.codeApplyForm[item.oid], |
| | | }; |
| | | }); |
| | | resForm.codeClassifyOid = this.codeClassifyOid; |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | this.$emit("submit", resForm); |
| | | }) |
| | | .catch(() => {}); |
| | | ); |
| | | } |
| | | // æé¤ä¸äºå段 |
| | | const noData = [ |
| | | "jiliangdwname", |
| | | "materialtypeText", |
| | | "morengongysname", |
| | | "$caigouwl", |
| | | "$xiaoshouwl", |
| | | "$shifoupihaoguanli", |
| | | "lcstatus_text", |
| | | "hesuanfenleiname", |
| | | "$kucunwl", |
| | | ]; |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues( |
| | | this.form |
| | | ); |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | const keys = Object.keys(formValue); |
| | | debugger |
| | | keys.forEach((item, index) => { |
| | | keys.forEach((itm, idx) => { |
| | | if ((item === ('$' + itm)) && idx !== index) { |
| | | this.$delete(formValue, keys[index]); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = this.secVOList.map((item) => { |
| | | return { |
| | | secOid: item.oid, |
| | | secValue: this.codeApplyForm[item.oid], |
| | | }; |
| | | }); |
| | | resForm.codeClassifyOid = this.codeClassifyOid; |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | this.$emit("submit", resForm); |
| | | }, |
| | | getDefaultValueAndFormValues(form) { |
| | | let defaultValue = {}; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogPush" append-to-body :close-on-click-modal="false" @close="recoverPage" title="导åº"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button type="success" |
| | | @click="handleExcel">ä¸è½½ å¤çº§è¡¨å¤´excel</el-button> |
| | | <el-radio-group v-model="radio"> |
| | | <el-radio :label="0">éæ©</el-radio> |
| | | <el-radio :label="1">å
¨é¨</el-radio> |
| | | <el-radio :label="2">页ç </el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div style="text-align: center"> |
| | | <el-transfer |
| | | style="text-align: left; display: inline-block;height: 400px" |
| | | filterable |
| | | :filter-method="filterMethod" |
| | | filter-placeholder="å
³é®è¯æç´¢" |
| | | v-model="value" |
| | | :titles="['æªé屿§', 'å·²é屿§']" |
| | | :data="data"> |
| | | </el-transfer> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "MasterTransfer", |
| | | props:['visible','tableHeadData','codeClassifyOid','tableData'], |
| | | data(){ |
| | | return { |
| | | data: [], |
| | | value: [], |
| | | filterMethod(query, item) { |
| | | return item.label.indexOf(query) > -1; |
| | | }, |
| | | dialogPush:this.visible, |
| | | radio:0, |
| | | tableHeadFindData:[], |
| | | tableExportData:[], |
| | | option:{ |
| | | title: 'ææ¡£æ é¢', |
| | | column: [{ |
| | | label: 'å¤çº§è¡¨å¤´', |
| | | prop: 'header', |
| | | children: [] |
| | | }], |
| | | data: [] |
| | | } |
| | | }; |
| | | }, |
| | | watch:{ |
| | | //çå¬åå§å |
| | | visible (){ |
| | | this.dialogPush = this.visible; |
| | | }, |
| | | //è¡¨å¤´æ°æ® ç¨æ¥æ¸²æç©¿æ¢æ¡ |
| | | tableHeadData:{ |
| | | handler(newval,oldval){ |
| | | console.log(newval) |
| | | if(newval){ |
| | | //excelè¡¨å¤´æ°æ®è½¬æ¢ |
| | | this.tableHeadFindData=newval.map(obj => obj.label); |
| | | this.tableHeadFindData.forEach((city, index) => { |
| | | this.data.push({ |
| | | label: city, |
| | | key: index, |
| | | }); |
| | | }); |
| | | //excelè¡¨æ ¼æ°æ®è½¬æ¢ |
| | | this.option.column[0].children=newval.map(obj => { |
| | | return { |
| | | label: obj.label, |
| | | prop: obj.prop |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | tableData(){ |
| | | // å°å¼éé¢çtrueæfalseæ¹åä¸ºæ¯æå¦ |
| | | this.option.data = this.tableData.map(obj => { |
| | | for (let prop in obj) { |
| | | if (obj[prop] === "true") { |
| | | obj[prop] = "æ¯"; |
| | | } else if (obj[prop] === "false") { |
| | | obj[prop] = "å¦"; |
| | | } |
| | | } |
| | | return obj; |
| | | }); |
| | | }, |
| | | codeClassifyOid:{ |
| | | handler(newval,oldval){ |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods:{ |
| | | //å
³éé¡µé¢ |
| | | recoverPage(){ |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | handleExcel(){ |
| | | this.$Export.excel({ |
| | | title: this.option.title, |
| | | columns: this.option.column, |
| | | data: this.option.data |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | |
| | | codeClassifyOid: this.nodeClickList.oid, |
| | | functionId: 5, |
| | | }).then(res => { |
| | | console.log('1-', res.data) |
| | | console.log('123-', res.data.buttons) |
| | | const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEBATCHADD", "CODESTARTPROCESS", "CODEEXPORT", "CODEQUERY"]; |
| | | const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY","batchApplyCode"]; |
| | | //ä¸åèç¹æ¾ç¤ºä¸åæé® |
| | | if (!res.data.leaf) { |
| | | this.masterVrBtnList = res.data.buttons.filter(obj => flagsToDeleteBtn.includes(obj.uniqueFlag)); |
| | |
| | | </div> |
| | | <el-table :data="ProData" |
| | | style="width: 100%" |
| | | height="280" |
| | | height="750" |
| | | @cell-click="handleCellClicks" |
| | | @select="selectHandle" |
| | | @selection-change="selectionChange" |
| | |
| | | }, |
| | | //æä¸¾æ³¨å
¥ä¿å |
| | | enumAddHandle() { |
| | | if (this.enumRow.length < 1) { |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®') |
| | | } else { |
| | | if(this.CurrentCell){ |
| | | this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.enumRow)); |
| | | let hasError = false; // æ·»å ä¸ä¸ªåé |
| | | this.tableData.forEach((item, index) => { |
| | | if (item.key === '') { |
| | | this.$message.warning(`第${index + 1}è¡çé项å¼ä¸è½ä¸ºç©º`); |
| | | hasError = true; |
| | | return; |
| | | } else if (item.value === '') { |
| | | this.$message.warning(`第${index + 1}è¡çé项䏿æ ç¾ä¸è½ä¸ºç©º`); |
| | | hasError = true; |
| | | return; |
| | | } |
| | | }); |
| | | // ä¿åæ§è¡é»è¾ |
| | | if (!hasError) { |
| | | if (this.CurrentCell) { |
| | | this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData)); |
| | | this.enumVisible = false; |
| | | }else { |
| | | this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.enumRow)); |
| | | this.tableData=[] |
| | | } else { |
| | | this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData)); |
| | | this.tableData=[]; |
| | | this.enumVisible = false; |
| | | } |
| | | } |
| | |
| | | selectHandle(selection,row){ |
| | | this.crudOid=row.oid; |
| | | this.crudArray=selection; |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | console.log(selection,row) |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | |
| | | |
| | | created() { |
| | | const formModel = this.root.propsAPI.getSelected()[0].getModel() |
| | | console.log(formModel, 'formModel'); |
| | | this.formModel = Object.assign( |
| | | { width: 80, height: 48 }, |
| | | { shape: 'flow-smooth' }, |
| | |
| | | <group-panel :status="status"> |
| | | <detail-form type="group" /> |
| | | </group-panel> |
| | | <node-panel :status="status"> |
| | | <!-- <edge-panel :status="status"> |
| | | <div class="event"> |
| | | <hr /> |
| | | <div class="btn_box"> |
| | | <el-button type="primary" size="mini">æ°å¢</el-button> |
| | | <el-button type="danger" size="mini">å é¤</el-button> |
| | | <el-button type="primary" size="mini">ä¿å</el-button> |
| | | </div> |
| | | <div class="flex" v-for="(item, index) in eventList" :key="index" :class="{active: index === currentActive}"> |
| | | <el-select size="mini" style="width: 70%" v-if="item.isEdit"> |
| | | <el-option></el-option> |
| | | </el-select> |
| | | <span v-else style="width: 70%">{{item.evenName}}</span> |
| | | <el-button size="mini" type="text" class="red">å é¤</el-button> |
| | | <el-button size="mini" type="text" @click="editChange(item)">{{item.isEdit ? 'æå' : 'ç¼è¾'}}</el-button> |
| | | </div> |
| | | <h4>è·è¿äºä»¶</h4> |
| | | <el-select |
| | | size="mini" |
| | | style="width: 100%" |
| | | value-key="oid" |
| | | v-model="saveEventList" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="itm in eventList" |
| | | :key="itm.oid" |
| | | :value="itm" |
| | | :label="itm.eventShowName" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | </node-panel> |
| | | |
| | | <!-- <multi-panel :status="status" /> --> |
| | | <!-- <canvas-panel :status="status" /> --> |
| | | </edge-panel> --> |
| | | </template> |
| | | </detail-panel> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import API from "@/api/modeling/cycle"; |
| | | |
| | | import { |
| | | NodePanel, |
| | | EdgePanel, |
| | |
| | | DetailPanel, |
| | | DetailForm, |
| | | }, |
| | | props: ["rowData", "existNodes", "type"], |
| | | props: ["rowData", "existNodes", "existEdges", "type", "currentSelectedLine"], |
| | | data() { |
| | | return { |
| | | newRowData: { |
| | |
| | | { required: true, message: "èµ·å§ç¶æä¸è½ä¸ºç©º", trigger: "change" }, |
| | | ], |
| | | }, |
| | | eventList: [{evenName: '123123'}], |
| | | currentActive: 0 |
| | | eventList: [], |
| | | saveEventList: [], |
| | | edgeEventList: {}, |
| | | currentActive: 0, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getEventList(); |
| | | }, |
| | | methods: { |
| | | getNewRowDate() { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | editChange(row) { |
| | | this.$set(row, 'isEdit', !row.isEdit) |
| | | } |
| | | getEventList() { |
| | | API.getEventList().then((res) => { |
| | | if (res.data.code === 200) { |
| | | this.eventList = res.data.data; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | rowData: { |
| | |
| | | this.newRowData.startStatus = undefined; |
| | | } |
| | | }, |
| | | currentSelectedLine: { |
| | | deep: true, |
| | | handler(newV) { |
| | | if (newV.id) { |
| | | if (this.edgeEventList[newV.id]) { |
| | | this.saveEventList = this.edgeEventList[newV.id] |
| | | } else { |
| | | this.edgeEventList[newV.id] = [] |
| | | this.saveEventList = [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | saveEventList: { |
| | | deep: true, |
| | | handler(newV) { |
| | | this.edgeEventList[this.currentSelectedLine.id] = newV |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | color: red; |
| | | } |
| | | .active { |
| | | box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4) |
| | | // box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4) |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <!-- Main Chart --> |
| | | <div class="vfe-chart-main"> |
| | | <flow :data="flowChartData" :onAfterChange="onAfterChange" /> |
| | | <flow |
| | | :data="flowChartData" |
| | | :onAfterChange="onAfterChange" |
| | | :onAfterItemSelected="onAfterItemSelected" |
| | | /> |
| | | <div class="tooltip"> |
| | | <template v-for="item in tooltipData"> |
| | | <p>{{ item.name }}: {{ item.value }}</p> |
| | |
| | | </div> |
| | | <div class="vfe-chart-panel" v-if="type !== 'detail'"> |
| | | <div class="vfe-chart-panel-detail"> |
| | | <editor-detail-panel :rowData="rowData" ref="EditorDetailPanel" :existNodes="existNodes" :type="type"/> |
| | | <editor-detail-panel |
| | | :rowData="rowData" |
| | | ref="EditorDetailPanel" |
| | | :existNodes="existNodes" |
| | | :existEdges="existEdges" |
| | | :currentSelectedLine="currentSelectedLine" |
| | | :type="type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | tooltipShow: true, |
| | | tooltipData: [], |
| | | existNodes: this.chartData.nodes || [] |
| | | existNodes: this.chartData.nodes || [], |
| | | existEdges: this.chartData.edges || [], |
| | | currentSelectedLine: {} |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.$message.error("ä¸è½æ·»å å·²åå¨çèç¹ï¼"); |
| | | } |
| | | } |
| | | const { nodes } = this.$refs.flowChart.propsAPI.save() |
| | | this.existNodes = nodes || [] |
| | | console.log(this.$refs.flowChart.propsAPI.save()); |
| | | const { nodes, edges } = this.$refs.flowChart.propsAPI.save(); |
| | | this.existNodes = nodes || []; |
| | | this.existEdges = edges || []; |
| | | }, |
| | | onAfterItemSelected({item}) { |
| | | if (item.target) { |
| | | const currentEdge = this.existEdges.filter(itm => itm.id === item.id)[0] || {} |
| | | console.log(currentEdge, 'currentEdgecurrentEdge'); |
| | | if (!Array.isArray(currentEdge.events)) { |
| | | currentEdge.events = [] |
| | | } |
| | | this.currentSelectedLine = currentEdge |
| | | } |
| | | }, |
| | | |
| | | _downloadImage(data, filename = "flowchart.png") { |
| | | const a = document.createElement("a"); |
| | | a.href = data; |
| | |
| | | getFlowData() { |
| | | return this.$refs.flowChart.propsAPI.save(); |
| | | }, |
| | | getEdgesEvents() { |
| | | return this.$refs.EditorDetailPanel.edgeEventList; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | console.log('---',this.parameter) |
| | | }, |
| | | created() { |
| | | console.log('parameter',this.parameter) |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setSaveParam() { |
| | |
| | | <template> |
| | | <div> |
| | | <el-button @click="HandlerRend" size="small" type="primary">ä¿å</el-button> |
| | | <el-button @click="HandlerSave" v-if="hasEditor" size="small" type="primary" style="margin-bottom: 20px">ä¿å</el-button> |
| | | <el-table |
| | | v-loading="isLoading" |
| | | :data="tableData" |
| | |
| | | style="" |
| | | @cell-click="handleCellClick" |
| | | > |
| | | <el-table-column fixed type="selection" width="55"> </el-table-column> |
| | | <el-table-column fixed label="åºå·" type="index" width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRow === row && editShow== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]" |
| | | <el-input v-if="editingRow === row && editShow== item.prop && item.edit == 'text'" v-model="row[item.prop]" |
| | | @blur="editingRows=null"></el-input> |
| | | <el-input-number size="small" controls-position="right" v-if="editingRow === row && editShow== item.prop && item.edit == 'number'" v-model="row[item.prop]" |
| | | @blur="editingRows=null" :style="{width:(item.width-10)+'px'}"></el-input-number> |
| | | <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRow === row && editShow== item.prop && item.edit == 'select' " @blur="editingRows=null"> |
| | | <el-option |
| | | v-for="optionItem in item.data" |
| | | v-for="optionItem in item.dicData" |
| | | :key="optionItem.dictValue" |
| | | :label="optionItem.dictValue" |
| | | :value="optionItem.dictValue"> |
| | |
| | | v-if="item.edit === 'switch' || item.edit === 'truefalse'" v-model="row[item.prop]" active-value="true" |
| | | inactive-value="false"> |
| | | </el-switch> |
| | | <span v-else>{{ row[item.prop] }}</span> |
| | | <vciWebRefer v-if="editingRow === row && editShow== item.prop && item.edit == 'refer'" |
| | | :referConfig="item.referConfig || {}" |
| | | :value="row[item.referConfig.field] || row[item.prop]" |
| | | :text="row[item.referConfig.showField]" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | <span v-else v-html="formatter(row,item)"></span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import {businese} from '@/api/work/businese' |
| | | import {FlowTable} from "@/api/GetItem"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getDictionary} from "@/api/system/dict"; |
| | | export default { |
| | | name: "BusinessWork", |
| | | props:['ids','templateId',"taskId","modelKey","codeClassifyOid"], |
| | |
| | | editingRow: null, |
| | | editShow: "", |
| | | editAttr: "", |
| | | hasEditor:false, |
| | | columnType: { |
| | | text: "input", |
| | | combox: "select", |
| | | truefalse: "switch", |
| | | number: "number", |
| | | textarea: "textarea", |
| | | datetime: "datetime", |
| | | date: "date", |
| | | refer: "refer" |
| | | } |
| | | } |
| | | }, |
| | |
| | | mounted() { |
| | | }, |
| | | methods:{ |
| | | HandlerRend(){ |
| | | HandlerSave(){ |
| | | this.editingRow = null; |
| | | //ä¿å |
| | | this.$message.success(this.tableData[0].tuhao) |
| | | }, |
| | | //è¡¨æ ¼å¤´æ¸²æ |
| | | CrudHeaderRend() { |
| | |
| | | 'modelKey': this.modelKey, |
| | | 'codeClassifyOid': this.codeClassifyOid |
| | | }).then((res) => { |
| | | this.hasEditor=res.data.tableDefineVO.hasEditor; |
| | | this.options = res.data.tableDefineVO.seniorQueryColumns; |
| | | this.List = res.data.tableDefineVO.cols[0]; |
| | | this.tableHeadData=[]; |
| | |
| | | prop: item.field, |
| | | type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth |
| | | width: item.minWidth, |
| | | edit:this.columnType[item.edit] |
| | | }; |
| | | if(item.field == 'id' && validatenull(item.templet)){ |
| | | //ä¼ä¸ç¼ç çé»è®¤æ·»å è¶
龿¥,ææªå®ç° |
| | |
| | | return row[column.property] == 'true' || row[column.property] == '1' ? 'æ¯' : 'å¦' |
| | | } |
| | | } |
| | | |
| | | } |
| | | if(validatenull(item.edit)) { |
| | | if (typeof item.editConfig == "string") { |
| | | columnItem.editConfig = eval("(" + item.editConfig + ")"); |
| | | } else { |
| | | columnItem.editConfig = item.editConfig |
| | | } |
| | | if (item.edit == 'select') { |
| | | //éè¦è·åä¸ææ¡æ°æ® |
| | | columnItem.data=[] |
| | | columnItem.dicData = columnItem.editConfig.comboxConfig.data || this.geDictData(columnItem.editConfig.comboxConfig.comboxKey) |
| | | } |
| | | if (item.edit == 'refer') { |
| | | columnItem.referConfig = { |
| | | title: item.title, |
| | | showField: item.showField || item.field, |
| | | field: item.field, |
| | | options: columnItem.editConfig.referConfig |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.tableHeadData.push(Object.assign(item, columnItem)) |
| | | }); |
| | | }); |
| | |
| | | this.tableData = res.data.data; |
| | | }) |
| | | }, |
| | | // 弿¥è·ååå
¸æ°æ® |
| | | geDictData(dictKey) { |
| | | getDictionary({code: dictKey}).then((res) => { |
| | | if (res.data && res.data.code === 200) { |
| | | return (res.data.data || []).map((itm) => { |
| | | itm.value = itm.dictValue; |
| | | itm.key = itm.dictKey; |
| | | return itm; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // çå¬åå
æ ¼ç¹å»äºä»¶å¹¶å卿£å¨ç¼è¾çè¡ |
| | | handleCellClick(row, column, cell, event) { |
| | | this.editingRow = row; |
| | | this.editShow = column.property; |
| | | }, |
| | | formatter(row, column){ |
| | | if(column.formatter){ |
| | | return column.formatter(row,column) |
| | | }else{ |
| | | return row[column.prop] |
| | | } |
| | | }, |
| | | setReferValue(data) { |
| | | if (data.field) { |
| | | this.editingRow[data.field] = data.value || ""; |
| | | this.editingRow[data.showField] = data.text || ""; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import FlowPath from "@/components/template/FlowPath"; |
| | | import Stage from "@/components/template/Stage"; |
| | | import businesswork from "@/components/work/BusinessWork" |
| | | |
| | | import MasterTransfer from "@/components/Master/MasterTransfer"; |
| | | // å°å·¥å
·å½æ°æ·»å å°å
¨å± |
| | | import utilFunc from './util/func' |
| | | import flowPath from "@/views/flow/flowPath"; |
| | | Vue.prototype.$utilFunc = utilFunc |
| | | // 注åå
¨å±crudé©±å¨ |
| | | window.$crudCommon = crudCommon; |
| | |
| | | Vue.component('Stage',Stage) |
| | | Vue.component('Divider', Divider) |
| | | Vue.component('businesswork', businesswork) |
| | | Vue.component('MasterTransfer', MasterTransfer) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | <!-- 主ä½è§å¾å± --> |
| | | <div style="height:100%;overflow-y:auto;overflow-x:hidden;" id="avue-view" v-show="!isSearch"> |
| | | <keep-alive> |
| | | <!--<router-view class="avue-view" v-if="$route.meta.keepAlive"/>--> |
| | | <router-view class="avue-view"/> |
| | | <router-view class="avue-view" v-if="$route.meta.keepAlive"/> |
| | | </keep-alive> |
| | | <!--<router-view class="avue-view" v-if="!$route.meta.keepAlive"/>--> |
| | | <router-view class="avue-view" v-if="!$route.meta.keepAlive"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | components: { CycleFlow }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | // 'contionMap[id]': 'qwe' |
| | | // contionMap: [ |
| | | // {id: 'qwe'} |
| | | // ] |
| | | }, |
| | | form: {}, |
| | | page: { |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | }); |
| | | }, |
| | | async submit() { |
| | | // const data = { |
| | | // startStatus: "Auditing", |
| | | // name: "22", |
| | | // id: "asas", |
| | | // nodes: [ |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Auditing", |
| | | // x: 278.60856031183397, |
| | | // y: 84.12841612613737, |
| | | // id: "Auditing", |
| | | // change: true, |
| | | // index: 0, |
| | | // name: "Auditing", |
| | | // indexNum: 0, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Editing", |
| | | // x: 294.17388658989535, |
| | | // y: 299.9676071819219, |
| | | // id: "Editing", |
| | | // change: true, |
| | | // index: 1, |
| | | // name: "Editing", |
| | | // indexNum: 1, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "drg", |
| | | // x: 278.60856031183397, |
| | | // y: 463.92237731083515, |
| | | // id: "drg", |
| | | // change: true, |
| | | // index: 3, |
| | | // name: "drg", |
| | | // indexNum: 3, |
| | | // }, |
| | | // ], |
| | | // edges: [ |
| | | // { |
| | | // source: "Auditing", |
| | | // sourceAnchor: 2, |
| | | // target: "Editing", |
| | | // targetAnchor: 0, |
| | | // id: "3083896f", |
| | | // index: 2, |
| | | // indexNum: 2, |
| | | // events: [ |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEvente", |
| | | // eventShowName: "TransationEventE", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "5", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // source: "Editing", |
| | | // sourceAnchor: 2, |
| | | // target: "drg", |
| | | // targetAnchor: 0, |
| | | // id: "b941a21d", |
| | | // index: 4, |
| | | // indexNum: 4, |
| | | // events: [ |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEventf", |
| | | // eventShowName: "TransationEventF", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "6", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEvente", |
| | | // eventShowName: "TransationEventE", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "5", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }; |
| | | // API.add(data) |
| | | // .then((res) => { |
| | | // this.submitLoading = false; |
| | | // if (res.data.code === 200) { |
| | | // this.$message.success( |
| | | // this.type === "edit" ? "ä¿®æ¹æåï¼" : "æ°å¢æåï¼" |
| | | // ); |
| | | // this.visible = false; |
| | | // this.search(); |
| | | // } |
| | | // }) |
| | | // .catch(() => { |
| | | // this.submitLoading = false; |
| | | // }); |
| | | // return; |
| | | const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData(); |
| | | if (!newRowData) { |
| | | return; |
| | | } |
| | | // const edgeEvents = this.$refs.vueFlowchartEditor.getEdgesEvents(); |
| | | const flowData = await this.$refs.vueFlowchartEditor.getFlowData(); |
| | | if (Array.isArray(flowData.nodes)) { |
| | | flowData.nodes = flowData.nodes.map((item) => { |
| | |
| | | flowData.edges = flowData.edges.map((item) => { |
| | | item.name = item.label; |
| | | item.indexNum = item.index; |
| | | // item.events = edgeEvents[item.id] || []; |
| | | return item; |
| | | }); |
| | | } |
| | |
| | | ...newRowData, |
| | | ...flowData, |
| | | }; |
| | | |
| | | debugger; |
| | | this.submitLoading = true; |
| | | let APIFun = API.add; |
| | | if (this.type === "edit") { |
| | |
| | | }, |
| | | handelExecute(event) { |
| | | console.log(event) |
| | | if(this.$refs.businesswork.hasEditor){ |
| | | this.$refs.businesswork.HandlerSave() |
| | | } |
| | | const { toName, conditionKey, conditionValue } = event |
| | | let param = { |
| | | comment: this.opinionVal || 'åæ', |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://localhost:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://192.168.1.46:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | // target: 'http://192.168.1.104:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.entity.CodeAllCode; |
| | | import com.vci.ubcs.code.entity.CodeClassify; |
| | | import com.vci.ubcs.code.enumpack.CodeDefaultLC; |
| | | import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum; |
| | | import com.vci.ubcs.code.lifecycle.CodeAllCodeLC; |
| | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.util.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; |
| | |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.web.toolmodel.DateConverter; |
| | | import com.vci.ubcs.starter.web.util.*; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.map.HashedMap; |
| | |
| | | import org.apache.poi.ss.usermodel.Font; |
| | | import org.apache.poi.ss.usermodel.RichTextString; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.alibaba.druid.util.FnvHash.Constants.LIMIT; |
| | |
| | | |
| | | @Override |
| | | public R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot) { |
| | | |
| | | boolean success=true; |
| | | WriteExcelOption eo = new WriteExcelOption(); |
| | | AtomicBoolean success= new AtomicBoolean(true); |
| | | codeImprotSaveDatVOList.stream().forEach(codeImprotSaveDatVO -> { |
| | | List<SheetRowData> rowDataList = new ArrayList<>(); |
| | | List<ClientBusinessObject>cboList=new ArrayList<>(); |
| | |
| | | log.error("æ¹é产çç¼ç çæ¶ååºéäº", e); |
| | | thisCbos.stream().forEach(cbo -> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";ç³»ç»é误ï¼å卿°æ®çæ¶ååºéäº"); |
| | | errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";ç³»ç»é误ï¼å卿°æ®çæ¶ååºéäº:"+e.getMessage()); |
| | | }); |
| | | } |
| | | } |
| | |
| | | try { |
| | | productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("æ¹é产çç¼ç çæ¶ååºéäº", e); |
| | | needSaveCboList.stream().forEach(cbo -> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";ç³»ç»é误ï¼å卿°æ®çæ¶ååºéäº:"+e.getMessage()); |
| | | }); |
| | | } |
| | | //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList); |
| | | } |
| | | } |
| | | if(errorMap.size()>0) { |
| | | success.set(false); |
| | | LinkedList<WriteExcelData> excelDataList = new LinkedList<>(); |
| | | excelDataList.add(new WriteExcelData(0, 0, "é误信æ¯")); |
| | | final int[] index = {1}; |
| | | errorMap.forEach((key,v)->{ |
| | | excelDataList.add(new WriteExcelData(index[0]++, 0, "第"+(Integer.parseInt(key)+1)+"è¡æ°æ®ï¼"+v)); |
| | | }); |
| | | eo.addSheetDataList(codeClassifyTemplateVO.getName() + "导å
¥æ¨¡æ¿", excelDataList); |
| | | } |
| | | }); |
| | | return R.success(isImprot?"æ¹éåå²å¯¼å
¥æå":"æ¹éç³è¯·æå"); |
| | | if(!success.get()){ |
| | | String excelName = LocalFileUtil.getDefaultTempFolder() + File.separator + (isImprot?"æ¹éåå²é误信æ¯.xls":"æ¹éç³è¯·é误信æ¯.xls"); |
| | | ExcelUtil.writeDataToFile(excelName,eo); |
| | | return R.fail(excelName); |
| | | }else { |
| | | return R.success(isImprot ? "æ¹éåå²å¯¼å
¥æå" : "æ¹éç³è¯·æå"); |
| | | } |
| | | } |
| | | |
| | | /*** |
| | |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | | cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret)); |
| | | } |
| | | cbo.setLcStatus(CodeDefaultLC.EDITING.getValue()); |
| | | }else{ |
| | | //æ¤æ¶è¿æ²¡æè½¬æ¢è·¯å¾ |
| | | //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath)); |
| | |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | | cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret)); |
| | | } |
| | | cbo.setLcStatus(CodeDefaultLC.EDITING.getValue()); |
| | | }else{ |
| | | //æ¤æ¶è¿æ²¡æè½¬æ¢è·¯å¾ |
| | | //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath)); |
| | |
| | | } |
| | | } |
| | | private List<ClientBusinessObject> ChangeMapTOClientBusinessObjects(List<Map<String,String>> oldDataMap){ |
| | | List<ClientBusinessObject> clientBusinessObjectList=new CopyOnWriteArrayList<>(); |
| | | oldDataMap.parallelStream().forEach(dataMap->{ |
| | | List<ClientBusinessObject> clientBusinessObjectList=new ArrayList<>(); |
| | | oldDataMap.stream().forEach(dataMap->{ |
| | | ClientBusinessObject clientBusinessObject=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(dataMap,clientBusinessObject); |
| | | dataMap.forEach((key,value)->{ |
| | | clientBusinessObject.setAttributeValue(key,value); |
| | | }); |
| | | for (String key:dataMap.keySet()){ |
| | | Object value= dataMap.getOrDefault(key,""); |
| | | clientBusinessObject.setAttributeValue(key,value.toString()); |
| | | } |
| | | clientBusinessObjectList.add(clientBusinessObject); |
| | | }); |
| | | return clientBusinessObjectList; |
| | | } |
| | |
| | | String[] secLengths = cbo.getData().get(CODE_SEC_LENGTH_FIELD).split("#"); |
| | | cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//å°æ¤keyé¤å» |
| | | cbo.getData().remove(IMPORT_ROW_INDEX);//å°æ¤keyé¤å» |
| | | cbo.getData().remove("codeclassifyid");//å°æ¤keyé¤å» |
| | | List<CodeBasicSecVO> secVOList = ruleVO.getSecVOList().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); |
| | | Map<String/**ç æ®µç主é®**/,String/**ç æ®µçå¼**/> serialValueMap = new HashMap<>(); |
| | | Map<String, CodeBasicSecVO> secVOMap = secVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | |
| | | |
| | | for (int i = 0; i < dataCBOList.size(); i++) { |
| | | BaseModel cbo = dataCBOList.get(i); |
| | | cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//å°æ¤keyé¤å» |
| | | cbo.getData().remove(IMPORT_ROW_INDEX);//å°æ¤keyé¤å» |
| | | cbo.getData().remove("codeclassifyid");//å°æ¤keyé¤å» |
| | | List<String> thisSecValueList = new LinkedList<>(); |
| | | for (int j = 0; j < secValueList.size(); j++) { |
| | | thisSecValueList.add(secValueList.get(j)); |
| | |
| | | } |
| | | saveSerialValue( ruleVO, lastMaxSerialValueMap, maxSerialValueMap); |
| | | |
| | | allCodeDOList.stream().forEach( |
| | | allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} |
| | | ); |
| | | |
| | | |
| | | Map<String, String> statusMap = allCodeDOList.stream().collect(Collectors.toMap(s -> s.getOid(), s -> s.getLcStatus())); |
| | | allCodeDOList.stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmname())).forEach(s -> { |
| | | s.setLcStatus(statusMap.get(s.getOid())); |
| | | }); |
| | | |
| | | |
| | | allCodeDOList.stream().forEach( |
| | | allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} |
| | | ); |
| | | |
| | | codeAllCodeService.saveBatch(allCodeDOList); |
| | | // iCodeWupinService.saveBatch(dataCBOList); |
| | |
| | | @Slf4j |
| | | @VciWebservice(path = "/universalInterface") |
| | | public class UniversalInterfaceImpl<IDockingLogeServiceing> implements UniversalInterfaceI { |
| | | @Value("${code.checkConfig:true}") |
| | | @Value("${code.universalinterface.checkSystemConfig:true}") |
| | | public boolean CODE_CHECKCONFIG; |
| | | @Autowired(required = false) |
| | | private AttributeMapConfig attributeMapConfig; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @ConfigurationProperties(prefix="attrconfig") |
| | | @ConfigurationProperties(prefix="code.universalinterface.attrconfig") |
| | | @Component |
| | | public class AttributeMapConfig { |
| | | private Map<String,String> system_attrmap; |