| | |
| | | :style="{'background-color':app.bk_color,'color':app.bk_color}"> |
| | | <i :class="app.img_font_style" :style="{'color':app.txt_color}"></i> |
| | | </a> |
| | | <p :data-key="app.id">{{ app.name || app.list_name}}</p> |
| | | <p :data-key="app.id">{{ app.list_name|| app.name}}</p> |
| | | </li> |
| | | |
| | | </ul> |
| | |
| | | |
| | | <script> |
| | | import Base64 from '../../components/js-base64/base64.js' |
| | | import utils from "@/js/utils.js" |
| | | export default { |
| | | modules: { |
| | | Base64, |
| | |
| | | |
| | | if (this.$store.state.areaFunc) |
| | | this.data = this.$store.state.areaFunc.data; |
| | | else |
| | | this.$store.dispatch('areaFunc', {}).then(success => { |
| | | else { |
| | | const appType = utils.session.getValue('app_type') || "MES"; |
| | | this.$store.dispatch('areaFunc', { |
| | | app_type: appType, |
| | | need_ace:1, |
| | | }).then(success => { |
| | | // console.log(success); |
| | | if (success.code == '00000' || success.err_code == 0) { |
| | | this.data = success.data; |
| | | if (success.err_code != undefined) { //判断是否是Mobox3 |
| | | success.result.forEach(async (area, index) => { |
| | | if (area.client_type == 2) { //判断类型是否是PDA类型 |
| | | area.app_type= appType |
| | | await this.GetFuncTree(index, area); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title:this.translateSys("error"), |
| | | title: this.translateSys("error"), |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText:this.translateSys("cancel") |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | |
| | | title: this.translateSys("error"), |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText:this.translateSys("cancel") |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | async GetFuncTree(index, area) { //Mobox3获取应用领域的功能点 |
| | | this.data = []; |
| | | var $this = this; |
| | | |
| | | var json = { |
| | | app_type: "MES", |
| | | app_type: area.app_type, |
| | | area_id: area.id, |
| | | area_client_type: area.client_type, |
| | | need_ace: '0', |
| | | need_ace:1, |
| | | }; |
| | | this.$store.dispatch('GetFuncTree', json).then(success => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | if ((success.result || []).length > 0) { |
| | | $this.data.push(success.result[0]); |
| | | console.log("onLoad", $this.data) |
| | | this.$store.commit("areaFunc", $this.data); |
| | | } |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title:this.translateSys("error"), |
| | | title: this.translateSys("error"), |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | |
| | | appCreate(app) { //点击功能点跳转页面 |
| | | console.log(app); |
| | | var paramStr = this.$store.state.OIMoboxSAPI ? app.param : app.Param; |
| | | var appName = this.$store.state.OIMoboxSAPI ? (app.name || app.list_name) : app.Name; |
| | | var appName = this.$store.state.OIMoboxSAPI ? (app.list_name || app.name) : app.Name; |
| | | var defCode = this.$store.state.OIMoboxSAPI ? app.def_code : app.DefCode; |
| | | var param = ""; |
| | | if (paramStr) { |
| | |
| | | if (!param) { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content:this.translate('tip_no_app_param'), |
| | | content: this.translate('tip_no_app_param'), |
| | | showCancel: false, |
| | | confirmText:this.translateSys("cancel") |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | return; |
| | | } |