From 1f631433ad4d54484b1d956ae05b8c36e5d4e95f Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期二, 24 十月 2023 09:13:49 +0800 Subject: [PATCH] modified: src/api/basic/part.js modified: src/page/index/index.vue modified: src/page/index/layout.vue modified: src/page/index/logo.vue modified: src/page/index/sidebar/sidebarItem.vue modified: src/page/index/tags.vue modified: src/views/basic/location/location-form.vue modified: src/views/basic/part/index.vue modified: src/views/basic/warehouse/warehouse-form.vue modified: src/views/basic/workstation/workstation-form.vue modified: src/views/plan/schedulelookover/index.vue --- src/page/index/layout.vue | 2 src/page/index/sidebar/sidebarItem.vue | 94 ++++++++++++----------- src/views/basic/part/index.vue | 63 +++++++++------ src/views/basic/workstation/workstation-form.vue | 16 ++- src/api/basic/part.js | 8 +- src/page/index/index.vue | 2 src/page/index/tags.vue | 2 src/views/basic/warehouse/warehouse-form.vue | 4 src/views/plan/schedulelookover/index.vue | 2 src/views/basic/location/location-form.vue | 4 src/page/index/logo.vue | 6 11 files changed, 111 insertions(+), 92 deletions(-) diff --git a/src/api/basic/part.js b/src/api/basic/part.js index 28c6263..be3b58f 100644 --- a/src/api/basic/part.js +++ b/src/api/basic/part.js @@ -115,13 +115,13 @@ /** * 鍚屾鍩虹鏁版嵁 - * @param query + * @param obj * @returns {*} */ -export function syncPart(query) { +export function syncPart(obj) { return request({ - url: '/mes/part/syncPart', + url: '/mes/part/syncNewIfs', method: 'post', - params: query + data: obj }) } diff --git a/src/page/index/index.vue b/src/page/index/index.vue index 3b195d5..ed3f1d4 100644 --- a/src/page/index/index.vue +++ b/src/page/index/index.vue @@ -1,6 +1,6 @@ <template> <div :class="{ 'avue--collapse': isCollapse }" class="avue-contail"> - <div class="avue-header" style="background-color: rgb(160, 46, 109);"> + <div class="avue-header" style="background-color: #875a7b;"> <!-- 椤堕儴瀵艰埅鏍� --> <top /> </div> diff --git a/src/page/index/layout.vue b/src/page/index/layout.vue index 083049b..4cd4148 100644 --- a/src/page/index/layout.vue +++ b/src/page/index/layout.vue @@ -1,3 +1,3 @@ -<template> + <template> <router-view/> </template> diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue index a83c1bf..c968378 100644 --- a/src/page/index/logo.vue +++ b/src/page/index/logo.vue @@ -1,9 +1,9 @@ <template> - <div class="avue-logo" style="background-color:rgb(160, 46, 109);"> + <div class="avue-logo" style="background-color:#875a7b;"> <transition-group name="fade"> <template v-if="!keyCollapse"> <span - key="1" style="background-color:rgb(160, 46, 109);font-weight: bold; " + key="1" style="background-color:#875a7b;font-weight: bold; " class="avue-logo_title" @click="goIndex"><span class="logo-lg">{{sysTitle&&sysTitle!='null'?sysTitle:'MES'}}</span> </span> @@ -12,7 +12,7 @@ style="width: 220px;" src="/images/Sun-Mes-Logo-Normal.png" /></span>--> - <div key="1" style="width:220px;height:60px;background-color:rgb(160, 46, 109);position: relative;"> + <div key="1" style="width:220px;height:60px;background-color:#875a7b;position: relative;"> <el-image v-if="logSrc != null" style="width:200px;position: absolute;" diff --git a/src/page/index/sidebar/sidebarItem.vue b/src/page/index/sidebar/sidebarItem.vue index e988793..e916b12 100644 --- a/src/page/index/sidebar/sidebarItem.vue +++ b/src/page/index/sidebar/sidebarItem.vue @@ -1,48 +1,28 @@ <template> <div class="menu-wrapper"> - <template v-for="item in menu"> - <el-menu-item - v-if="validatenull(item[childrenKey]) && vaildRoles(item)" - :index="item[pathKey]" - :key="item[labelKey]" - :class="{'is-active':vaildAvtive(item)}" - @click="open(item)"> - <i :class="item[iconKey]"/> - <span - slot="title" - :alt="item[pathKey]">{{ item[labelKey] }}</span> + <template v-for="(item,index) in menus"> + <el-menu-item v-if="validatenull(item[childrenKey]) && vaildRoles(item)" :index="item[pathKey]" + :key="index" :class="{ 'is-active': vaildAvtive(item) }" @click="open(item)"> + <i :class="item[iconKey]" /> + <span slot="title" :alt="item[pathKey]">{{ item[labelKey] }}</span> </el-menu-item> - <el-submenu - v-else-if="!validatenull(item[childrenKey])&&vaildRoles(item)" - :index="item[pathKey]" - :key="item[labelKey]"> + <el-submenu v-else-if="!validatenull(item[childrenKey]) && vaildRoles(item)" :index="item[pathKey]" + :key="index"> <template slot="title"> - <i :class="item[iconKey]"/> - <span - slot="title" - :class="{'el-menu--display':collapse && first}">{{ item[labelKey] }}</span> + <i :class="item[iconKey]" /> + <span slot="title" :class="{ 'el-menu--display': collapse && first }">{{ item[labelKey] }}</span> </template> - <template v-for="(child,cindex) in item[childrenKey]"> - <el-menu-item - v-if="validatenull(child[childrenKey])" - :index="child[pathKey],cindex" - :class="{'is-active':vaildAvtive(child)}" - :key="child[labelKey]" - > + <template v-for="(child, cindex) in item[childrenKey]"> + <el-menu-item v-if="validatenull(child[childrenKey])" :index="child[pathKey], cindex" + :class="{ 'is-active': vaildAvtive(child) }" :key="cindex"> <!--<a slot="title" draggable="true" @dragend ="dragOpen(child)" style="display: block;" > <span>{{ child[labelKey] }}</span> </a>--> - <a slot="title" :href="'#'+child[pathKey]" @click.prevent="open(child)" style="display: block;" > + <a slot="title" :href="'#' + child[pathKey]" @click.prevent="open(child)" style="display: block;"> <span>{{ child[labelKey] }}</span> </a> </el-menu-item> - <sidebar-item - v-else - :menu="[child]" - :key="cindex" - :props="props" - :screen="screen" - :collapse="collapse"/> + <sidebar-item v-else :menu="[child]" :key="cindex" :props="props" :screen="screen" :collapse="collapse" /> </template> </el-submenu> </template> @@ -77,11 +57,17 @@ }, data() { return { - config: config + config: config, + menus: [], } }, - created() {}, - mounted() {}, + created() { + //杩囨护鍩虹涓嶈鐨勮彍鍗� + // this.filterMenus('鍩虹',['POC','鐩樺叿缁存姢','IFS鏃ュ織']) + }, + mounted() { + this.filterMenus('鍩虹',['POC','鐩樺叿缁存姢','IFS鏃ュ織']) + }, computed: { ...mapGetters(['roles']), labelKey() { @@ -101,12 +87,28 @@ } }, methods: { - dragOpen(item){ - var routeData=this.$router.resolve({ - name:item[this.labelKey], + filterMenus(fatherName, childrens) { + this.menus=this.menu + let start_menu = JSON.parse(JSON.stringify(this.menus)); + let base = start_menu.filter(item => { + return item.label === fatherName + })[0] + let up_base = base.children.filter(item => { + return !childrens.includes(item.label); + }) + this.menus.forEach(element => { + if (element.label === '鍩虹') { + element.children = [] + element.children = up_base + } + }); + }, + dragOpen(item) { + var routeData = this.$router.resolve({ + name: item[this.labelKey], query: item.query }); - window.open(routeData.href,'_blank'); + window.open(routeData.href, '_blank'); }, vaildAvtive(item) { const groupFlag = (item['group'] || []).some(ele => @@ -126,24 +128,24 @@ console.log(item[this.pathKey]) if (this.screen <= 1) this.$store.commit('SET_COLLAPSE'); this.$router.$avueRouter.group = item.group; - if(item[this.labelKey]=='宸ヤ綔鍙�'){ + if (item[this.labelKey] == '宸ヤ綔鍙�') { /*this.$router.push({ name:item[this.labelKey], query: item.query }).catch(() => {})*/ - var routeData=this.$router.resolve({ - name:item[this.labelKey], + var routeData = this.$router.resolve({ + name: item[this.labelKey], query: item.query }); window.open(routeData.href, '_blank'); - }else{ + } else { this.$router.push({ path: this.$router.$avueRouter.getPath({ name: item[this.labelKey], src: item[this.pathKey] }), query: item.query - }).catch(() => {}) + }).catch(() => { }) } } } diff --git a/src/page/index/tags.vue b/src/page/index/tags.vue index c71492d..2f3a9b9 100644 --- a/src/page/index/tags.vue +++ b/src/page/index/tags.vue @@ -1,5 +1,5 @@ <template> - <div style="background-color:rgb(160, 46, 109)" + <div style="background-color:#875a7b" v-if="showTag" @click="contextmenuFlag=false" class="avue-tags"> diff --git a/src/views/basic/location/location-form.vue b/src/views/basic/location/location-form.vue index c2591bf..35d131b 100644 --- a/src/views/basic/location/location-form.vue +++ b/src/views/basic/location/location-form.vue @@ -15,7 +15,7 @@ <el-row> <el-col :span="12"> <el-form-item label="宸ュ巶" prop="factoryId"> - <el-select + <el-select disabled v-model="dataForm.factoryId" filterable placeholder="璇烽�夋嫨宸ュ巶" @@ -222,7 +222,7 @@ visible: false, dataForm: { id: 0, - factoryId: '', + factoryId: 117, pType: '', locNo: '', locName: '', diff --git a/src/views/basic/part/index.vue b/src/views/basic/part/index.vue index 576a443..d91a4be 100644 --- a/src/views/basic/part/index.vue +++ b/src/views/basic/part/index.vue @@ -1,30 +1,29 @@ <template> <div class="mod-config"> <basic-container> - <ttable - :table="table" - @handleSelectionChange="handleSelectionChange" - :uploadInfo="uploadInfo" - :isShowHide="true" - :prelang="prelang" - :options="options" - :bottomOffset="125" - :ajaxFun="ajaxFun" - ref="partTable" - > + <ttable :table="table" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :isShowHide="true" + :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable"> <template #toolbar></template> </ttable> <!-- 寮圭獥, 鏂板 / 淇敼 --> - <table-form - v-if="addOrUpdateVisible" - ref="addOrUpdate" - @refreshDataList="getData" - ></table-form> - <PrintLabelForm - :currshowlist.sync="showPrintLabelForm" - :printLabelInfo="printLabelInfo" - /> + <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form> + <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" /> </basic-container> + <el-dialog title="鍚屾IFS" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"> + <el-row> + <el-col :span="6""> + 鍚屾鏃ユ湡锛� + </el-col> + <el-col :span="18"> + <el-date-picker style="width: 100%;" v-model="selectDate" type="date" placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + </el-col> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="handleClose">鍙� 娑�</el-button> + <el-button type="primary" @click="syncIfs">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -40,6 +39,8 @@ export default { data() { return { + selectDate: null, + dialogVisible: false, ajaxFun: fetchList, addOrUpdateVisible: false, multipleSelection: [], @@ -363,9 +364,9 @@ fun: this.addOrUpdateHandle }, { - text: '鍚屾ERP', + text: '鍚屾IFS', type: 'primary', - fun: this.syncIfs, + fun: this.syncISDate, loading: false }, { @@ -427,6 +428,10 @@ ...mapGetters(['permissions']) }, methods: { + handleClose() { + this.selectDate=null; + this.dialogVisible = false + }, // 鑾峰彇鏁版嵁鍒楄〃 getData() { this.$refs.partTable.getDataList() @@ -446,7 +451,7 @@ closeOnClickModal: false, type: 'warning' }) - .then(function() { + .then(function () { return delObj(row.id) }) .then((data) => { @@ -627,14 +632,22 @@ // this.$message.warning('璇峰厛閫夋嫨闆朵欢锛屽啀杩涜鍚屾锛�') // } // }, + syncISDate() { + this.dialogVisible = true + }, syncIfs() { - syncPart({}) + this.table.toolbar.find((e) => e.text === '鍚屾IFS').loading = true + this.handleClose() + let data=new FormData() + data.append("date",this.selectDatethis.selectDate) + console.log(data); + syncPart(data) .then((res) => { const data = res.data if (data.code === 0) { this.$message.success('寮�濮嬪悓姝�') } else { - this.$message.error('鍚屾ERP澶辫触') + this.$message.error('鍚屾IFS澶辫触') } }) .catch((e) => { diff --git a/src/views/basic/warehouse/warehouse-form.vue b/src/views/basic/warehouse/warehouse-form.vue index ff506ac..2b6cbad 100644 --- a/src/views/basic/warehouse/warehouse-form.vue +++ b/src/views/basic/warehouse/warehouse-form.vue @@ -60,7 +60,7 @@ <el-row> <el-col :span="12"> <el-form-item label="宸ュ巶" prop="factoryId"> - <el-select + <el-select disabled v-model="dataForm.factoryId" filterable placeholder="璇烽�夋嫨" @@ -187,7 +187,7 @@ warehouseName: '', warehouseDesc: '', warehouseType: '', - factoryId: '', + factoryId: 117, warehouseAddr: '', warehouseMap: '', warehouseStatus: '', diff --git a/src/views/basic/workstation/workstation-form.vue b/src/views/basic/workstation/workstation-form.vue index 3b09630..41fa6e2 100644 --- a/src/views/basic/workstation/workstation-form.vue +++ b/src/views/basic/workstation/workstation-form.vue @@ -64,7 +64,7 @@ </el-select> </el-form-item> <el-form-item label="宸ュ巶" prop="factoryId"> - <el-select + <el-select disabled v-model="dataForm.factoryId" placeholder="宸ュ巶" filterable @@ -87,12 +87,12 @@ </el-col> </el-form> </el-row> - <el-row> + <el-row style="width: 100%;"> <el-tabs type="card" v-model="activeTabName" ref="tabs" - style="height: 400px" + style="height: 400px;width: 100%;" > <el-tab-pane label="璁惧" name="equip"> <el-transfer @@ -160,7 +160,7 @@ > </el-transfer> </el-tab-pane> - <el-tab-pane label="妫�楠屽緟澶勭悊搴撲綅" name="pending"> + <!-- <el-tab-pane label="妫�楠屽緟澶勭悊搴撲綅" name="pending"> <el-transfer filterable v-model="pendingLocationIds" @@ -181,7 +181,7 @@ @change="handleProductInspectionLocation" > </el-transfer> - </el-tab-pane> + </el-tab-pane> --> <el-tab-pane label="浜哄伐妯℃澘" name="handyman"> <el-transfer filterable @@ -221,7 +221,7 @@ workstationNo: '', name: '', type: '', - factoryId: 0, + factoryId: 117, remark: '', artificialType: '', workCenter: '', @@ -296,6 +296,7 @@ 'dataForm.factoryId': { handler(newValue, oldValue) { if (!this.dataForm.id) { + console.log(1); if (newValue) { this.workstationFactory.factoryId = this.dataForm.factoryId getEquipmentByFactoryId(this.workstationFactory).then( @@ -592,3 +593,6 @@ } } </script> +<style scoped> + +</style> diff --git a/src/views/plan/schedulelookover/index.vue b/src/views/plan/schedulelookover/index.vue index de95a15..77e5163 100644 --- a/src/views/plan/schedulelookover/index.vue +++ b/src/views/plan/schedulelookover/index.vue @@ -145,7 +145,7 @@ viewEnd: this.scheduleDate[1], workStationList: this.workStationList, stateList: this.checkStatusList, - sceneId: null + sceneId: null, }) ) .then((response) => { -- Gitblit v1.9.3