Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="dialogVisible" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | style="max-height: 800px;" |
| | | title="æ¹éä¿®æ¹" |
| | | top="-5vh" |
| | | @opened="openDialog" |
| | | > |
| | | <el-table class="cus-table" ref="dataTable" :data="EditTableList" @cell-click="handleCellClicks" border> |
| | | <el-table-column v-if="EditTableList.length != 0" type="selection" width="55"></el-table-column> |
| | | <el-table-column v-if="EditTableList.length != 0" label="åºå·" type="index" width="55"> |
| | | </el-table-column> |
| | | <el-table-column v-for="item in this.tableHeadFindData" |
| | | :key="item.id" |
| | | :formatter="item.formatter" |
| | | :label="item.label" :prop="item.prop" |
| | | :show-overflow-tooltip="true" |
| | | :sortable="item.sortable" |
| | | :width="item.width" |
| | | align="center"> |
| | | <template slot-scope="{ row }"> |
| | | <el-input> |
| | | |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getFormTemplate} from "@/api/formTemplate.js"; |
| | | |
| | | export default { |
| | | name: "FormBulkEdit", |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | codeClassifyOid: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | templateOid: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | tableData: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | selectRow: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | tableHeadFindData: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | EditTableList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | computed: { |
| | | dialogVisible: { |
| | | get() { |
| | | return this.visible; |
| | | }, |
| | | set(val) { |
| | | this.$emit("update:visible", val); |
| | | }, |
| | | }, |
| | | }, |
| | | methods: { |
| | | //è¡¨æ ¼åå
æ ¼ç¼è¾ |
| | | handleCellClicks(){ |
| | | |
| | | }, |
| | | openDialog() { |
| | | this.EditTableList = this.tableData.filter(item => { |
| | | return this.selectRow.some(key => { |
| | | return item.oid === key.oid; |
| | | }); |
| | | }); |
| | | console.log(this.EditTableList) |
| | | console.log(this.tableHeadFindData) |
| | | }, |
| | | getFormTemplate() { |
| | | getFormTemplate({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | }).then(res => { |
| | | console.log(res) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | value: "key", |
| | | }, |
| | | }; |
| | | // console.log('formItem',formItem) |
| | | // console.log('columnItem',columnItem) |
| | | slotColumnList.push(columnItem); |
| | | if (group.length === 0) { |
| | | column.push(columnItem); |
| | |
| | | :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'ä¿®æ¹ç¼ç ä¿¡æ¯'" |
| | | :visible.sync="editvisible" |
| | | type="edit" @submit="EditSumbit"></FormTemplateDialog> |
| | | <!-- æ¹éç¼è¾--> |
| | | <FormBulkEdit :visible.sync="bulkeditvisible"></FormBulkEdit> |
| | | <!-- æ°æ®è¯¦æ
--> |
| | | <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" |
| | | :rowOid="this.LinkObject.oid" :templateOid="templateOid" |
| | |
| | | SetPersonnel, |
| | | ResembleQueryDialog, |
| | | BatchImport, |
| | | fileInHtml |
| | | fileInHtml, |
| | | }, |
| | | name: "Crud.vue", |
| | | props: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | //æ¹éç¼è¾å¯¹è¯æ¡ |
| | | bulkeditvisible:false, |
| | | LinkVisible: false, |
| | | LinkObject: {}, // ç¼ç æ°æ® |
| | | LinkList: [], |
| | |
| | | if (uniqueFlag === 'CODEAPPLY') return this.codeApplyHandler() |
| | | // æ å修订 |
| | | if (uniqueFlag === 'CODEAMEND') return this.codeAMENDHandler() |
| | | //æ¹éç¼è¾ |
| | | if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler() |
| | | }); |
| | | }, |
| | | //æ åç³è¯· |
| | |
| | | this.rowOid = this.selectRow[0].oid; |
| | | } |
| | | }, |
| | | //æ¹éç¼è¾ |
| | | bulkEditHandler(){ |
| | | if(this.selectRow.length <= 0){ |
| | | this.$message.warning('è¯·éæ©è³å°ä¸æ¡æ°æ®ï¼') |
| | | return; |
| | | } |
| | | const Editing = this.selectRow.every(item => item.lcstatus === 'Editing'); |
| | | |
| | | if (Editing) { |
| | | this.bulkeditvisible = true; |
| | | } else { |
| | | this.$message.warning('éæ©çæ°æ®ä¸æç¼ç ç¶æä¸æ¯âç¼è¾ä¸âï¼ä¸å¯ç¼è¾ï¼'); |
| | | } |
| | | }, |
| | | addSaveHandler(){ |
| | | this.$nextTick(() => { |
| | | this.addvisible = true; |
| | |
| | | <div> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <div style="display: flex;"> |
| | | <el-button plain size="small" type="primary" @click="TreeAdd" v-if="permissionList.TreeAddStatus">æ·»å </el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit" v-if="permissionList.TreeEditStatus">ä¿®æ¹</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel" v-if="permissionList.TreeDelStatus">å é¤</el-button> |
| | | <el-button plain size="small" type="primary" @click="flushed" v-if="permissionList.flushedStatus">å·æ°</el-button> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">æ·»å |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">å é¤ |
| | | </el-button> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">å·æ° |
| | | </el-button> |
| | | </div> |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button plain size="small" type="primary" @click="Enable" v-if="permissionList.EnableStatus">å¯ç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="Deactivate" v-if="permissionList.DeactivateStatus">åç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click.native="ImportExcel" v-if="permissionList.ImportExcelStatus">导å
¥</el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel" v-if="permissionList.ExportExcelStatus">导åº</el-button> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">å¯ç¨ |
| | | </el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> |
| | | åç¨ |
| | | </el-button> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" |
| | | @click.native="ImportExcel">导å
¥ |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" |
| | | @click="ExportExcel">å¯¼åº |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> |
| | |
| | | <el-form-item label="æ¯å¦åä¸å
³é®å±æ§æ ¡éªï¼" label-width="170px"> |
| | | <el-switch |
| | | v-model="TreeAddform.codeKeyAttrValue" |
| | | active-text="æ¯" |
| | | inactive-text="å¦" |
| | | active-color="#13ce66" |
| | | active-text="æ¯" |
| | | inactive-color="#ff4949" |
| | | inactive-text="å¦" |
| | | @change="switchChange"> |
| | | </el-switch> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button plain size="small" type="primary" @click="FindeHanler" v-if="permissionList.FindStatus">æ¥è¯¢</el-button> |
| | | <el-button plain size="small" type="primary" @click="TemRefresh" v-if="permissionList.TemRefreshStatus">å·æ°</el-button> |
| | | <el-button plain size="small" type="primary" @click="CloneBtn" v-if="permissionList.CloneBtnStuatus">ä»å
¶å®æ¨¡æ¿å
é</el-button> |
| | | <el-button v-if="permissionList.FindStatus" plain size="small" type="primary" |
| | | @click="FindeHanler">æ¥è¯¢</el-button> |
| | | <el-button v-if="permissionList.TemRefreshStatus" plain size="small" type="primary" |
| | | @click="TemRefresh">å·æ°</el-button> |
| | | <el-button v-if="permissionList.CloneBtnStuatus" plain size="small" type="primary" @click="CloneBtn">ä»å
¶å®æ¨¡æ¿å
é</el-button> |
| | | <!-- æ¥è¯¢å¯¹è¯æ¡--> |
| | | <el-dialog :visible.sync="FindFormVisible" append-to-body title="é«çº§æ¥è¯¢"> |
| | | <div> |
| | |
| | | import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' |
| | | import func from "@/util/func"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "classifyTrees.vue", |
| | | data() { |
| | |
| | | }, |
| | | //åç±»æ æ°æ®å¤ç |
| | | getAttr() { |
| | | getAtrrList().then(res => { |
| | | this.loading = true; |
| | | return new Promise((resolve, reject) => { |
| | | getAtrrList() |
| | | .then(res => { |
| | | this.Treedata = res.data; |
| | | this.CloneTreedata = res.data; |
| | | this.Treedata.forEach(() => { |
| | |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | |
| | | this.loading = false; |
| | | resolve(); // å®æè¯·æ±ï¼è°ç¨resolveæ¹æ³ |
| | | }) |
| | | .catch(error => { |
| | | this.$message.error(error) |
| | | reject(error); // 请æ±åºéï¼è°ç¨rejectæ¹æ³ |
| | | }); |
| | | }); |
| | | }, |
| | | //å®ä¹ä¸ä¸ªä¿®æ¹æ°æ®å±æ§åçæ¹æ³ |
| | | ModifyProperties(obj, oldName, newName) { |
| | |
| | | this.$refs.myForm.clearValidate(); |
| | | }, |
| | | //æ èç¹æ·»å äºä»¶ |
| | | TreeAddHandler() { |
| | | async TreeAddHandler() { |
| | | if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) { |
| | | this.$message.warning('请è¾å
¥å
容ï¼'); |
| | | } else { |
| | | return; |
| | | } |
| | | try { |
| | | const data = this.TreeAddform; |
| | | this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid); |
| | | TreeSave(data) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æ·»å æå!", |
| | | }); |
| | | await TreeSave(data) |
| | | this.$message.success("æ·»å æå!"); |
| | | Object.keys(this.TreeAddform).forEach(key => { |
| | | this.TreeAddform[key] = ""; |
| | | }); |
| | | this.TreeAddform.codeKeyAttrValue = true; |
| | | this.TreeAddform.isParticipateCheck = 1; |
| | | }); |
| | | this.getAttr(); |
| | | this.TreeAddFormVisible = false; |
| | | //æ·»å 宿åå³ä¾§æ¸
空 |
| | | this.ProData = []; |
| | | this.Formlist = []; |
| | | }) |
| | | .catch((res) => { |
| | | } catch (res) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res, |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | //æ å·æ° |
| | | flushed() { |
| | | this.loading = true |
| | | this.getAttr() |
| | | setTimeout(() => { |
| | | this.loading = false; |
| | | async flushed() { |
| | | await this.getAttr() |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.nodeClickList = {} |
| | | this.TreeList = [] |
| | | this.TreeFlagCode = true; |
| | | }, 600); |
| | | }, |
| | | //å¯ç¨ååç¨é½å
å¤æç¶æ |
| | | //å¯ç¨ |
| | | Enable() { |
| | | async Enable() { |
| | | if (Object.keys(this.nodeClickList).length < 1) { |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®') |
| | | } else { |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | if (this.FlagObj.lcStatus == "Enabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯åç¨ç¶æ' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦å°ååç±»ä¸å¹¶å¯ç¨ï¼', 'æç¤º', { |
| | | return; |
| | | } |
| | | this.loading = true; |
| | | try { |
| | | const confirmResult = await this.$confirm('æ¯å¦å°ååç±»ä¸å¹¶å¯ç¨ï¼', 'æç¤º', { |
| | | confirmButtonText: 'æ¯', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeEnable(this.nodeClickList).then(() => { |
| | | }); |
| | | if (confirmResult) { |
| | | await TreeEnable(this.nodeClickList).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å¯ç¨æå!' |
| | | }); |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | await this.getAttr(); |
| | | |
| | | } else { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å¯ç¨' |
| | | }); |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | |
| | | async Deactivate() { |
| | | if (Object.keys(this.nodeClickList).length < 1) { |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | |
| | | }, |
| | | //åç¨ |
| | | Deactivate() { |
| | | if (Object.keys(this.nodeClickList).length < 1) { |
| | | this.$message.warning('请å
仿 ä¸éæ©ä¸æ¡æ°æ®') |
| | | } else { |
| | | if (this.FlagObj.lcStatus === "Disabled") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'å½ååç±»ä¸æ¯å¯ç¨ç¶æ!' |
| | | }); |
| | | } else { |
| | | this.$confirm('æ¯å¦åç¨å½ååç±»ï¼åç¨åï¼ååç±»ä¹å°ä¸è½è¢«ä½¿ç¨ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | return; |
| | | } |
| | | |
| | | this.loading = true; |
| | | try { |
| | | const confirmResult = await this.$confirm('æ¯å¦åç¨å½ååç±»ï¼åç¨åï¼ååç±»ä¹å°ä¸è½è¢«ä½¿ç¨ï¼æ¯å¦ç»§ç»ï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | TreeDeactivate(this.nodeClickList).then(() => { |
| | | }); |
| | | if (confirmResult) { |
| | | await TreeDeactivate(this.nodeClickList).then(res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'åç¨æå!' |
| | | }); |
| | | this.nodeClickList['flag'] = true; |
| | | this.getAttr() |
| | | }) |
| | | }).catch(() => { |
| | | this.nodeClickList['flag'] = true; |
| | | await this.getAttr(); |
| | | } else { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶åç¨' |
| | | }); |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | //æ ç¹å»äºä»¶ |
| | |
| | | label: "æå±è¡ä¸åç§°", |
| | | prop: "name", |
| | | type: "input", |
| | | labelWidth:110, |
| | | search: true, |
| | | }, |
| | | { |
| | |
| | | :referConfig="this.referConfig || {}" |
| | | :display="true" |
| | | :value="form.customCodeSerialClass" |
| | | :text="form.customCodeSerialClass" |
| | | :text="form.customCodeSerialClassText" |
| | | :serialType="form.serialType" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | <!-- <el-input--> |
| | | <!-- v-model="form.customCodeSerialClass"--> |
| | | <!-- :readonly="basicSecOnlyRead"--> |
| | | <!-- @focus="streamFocusHandler"--> |
| | | <!-- ></el-input>--> |
| | | </template> |
| | | |
| | | |
| | |
| | | title: 'èªå®ä¹æµæ°´åç
§', |
| | | showField: 'customCodeSerialClassText', |
| | | field: 'customCodeSerialClass', |
| | | fieldMap: {}, |
| | | fieldMap: { |
| | | serialType:"serialType" |
| | | }, |
| | | placeholder:'è¯·éæ©èªå®ä¹æµæ°´', |
| | | options: { |
| | | // 设置é»è®¤ç屿§ |
| | | url: 'api/ubcs-code/codeSerialAlgorithmController/gridCodeSerialAlgorithm', |
| | | textField:'name', |
| | | valueField:'classFullName', |
| | | textField:'classFullName', |
| | | isMuti: false, |
| | | type: "grid", |
| | | method: 'get', |
| | |
| | | {title: 'ç®æ³ç¼å·', field: 'id', width: 200}, |
| | | {title: 'ç®æ³åç§°', field: 'name', width: 150}, |
| | | {title: 'ç±»å
¨è·¯å¾', field: 'classFullName', width: 300}, |
| | | {title: 'ç±»å', field: 'serialType', width: 300}, |
| | | {title: 'æè¿°', field: 'description'} |
| | | ], |
| | | queryColumns: [ |
| | |
| | | methods: { |
| | | //èªå®ä¹æµæ°´å¤±ç¦ |
| | | setReferValue(data){ |
| | | console.log(data) |
| | | if(data.field){ |
| | | this.form[data.field] = data.value || ""; |
| | | // this.form[data.showField] = data.text || ""; |
| | | this.form[data.showField] = data.text || ""; |
| | | this.form.serialType = data.rawData[0].serialType || ""; |
| | | |
| | | } |
| | | }, |
| | | /** 转移è§åææè
å¯¹è¯æ¡ */ |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://127.0.0.1:37000', |
| | | // target: 'http://127.0.0.1:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | //yxc |
| | | // target: 'http:// 192.168.0.104:37000', |
| | | // target: 'http://192.168.0.105:37000', |