Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Date: 2024-03-24 11:37:47 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-27 20:26:42 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/api/model/machineManagement.js |
| | | */ |
| | | import config from "@/config" |
| | | import http from "@/utils/request" |
| | | |
| | | export default { |
| | | getList: { |
| | | url: `${config.API_URL}/blade-cps/machine/page`, |
| | | name: "è·åå·¥ä½å表", |
| | | get: async function (params) { |
| | | return await http.post(this.url, { ...params }, { params: { current: params.current, size: params.size } }); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | |
| | | (config) => { |
| | | let token = tool.cookie.get("TOKEN"); |
| | | config.headers['Authorization'] = 'Basic c2FiZXI6c2FiZXJfc2VjcmV0' |
| | | if(token){ |
| | | if (token) { |
| | | config.headers[sysConfig.TOKEN_NAME] = sysConfig.TOKEN_PREFIX + token |
| | | } |
| | | if(!sysConfig.REQUEST_CACHE && config.method == 'get'){ |
| | | if (!sysConfig.REQUEST_CACHE && config.method == 'get') { |
| | | config.params = config.params || {}; |
| | | // config.params['_'] = new Date().getTime(); |
| | | } |
| | |
| | | message: error.response.data.message || "Status:500ï¼æå¡å¨åçé误ï¼" |
| | | }); |
| | | } else if (error.response.status == 401) { |
| | | if(!MessageBox_401_show){ |
| | | if (!MessageBox_401_show) { |
| | | MessageBox_401_show = true |
| | | ElMessageBox.confirm('å½åç¨æ·å·²è¢«ç»åºææ æé访é®å½åèµæºï¼è¯·å°è¯éæ°ç»å½ååæä½ã', 'æ æé访é®', { |
| | | type: 'error', |
| | |
| | | done() |
| | | } |
| | | }).then(() => { |
| | | router.replace({path: '/login'}); |
| | | }).catch(() => {}) |
| | | router.replace({ path: '/login' }); |
| | | }).catch(() => { }) |
| | | } |
| | | } else { |
| | | ElNotification.error({ |
| | |
| | | } |
| | | ); |
| | | function qsStringify(obj) { |
| | | return Object.keys(obj) |
| | | .map(key => { |
| | | if (Array.isArray(obj[key])) { |
| | | return obj[key] |
| | | .map(arrayValue => `${encodeURIComponent(key)}=${encodeURIComponent(arrayValue)}`) |
| | | .join('&'); |
| | | } |
| | | return `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`; |
| | | }) |
| | | .join('&'); |
| | | return Object.keys(obj) |
| | | .map(key => { |
| | | if (Array.isArray(obj[key])) { |
| | | return obj[key] |
| | | .map(arrayValue => `${encodeURIComponent(key)}=${encodeURIComponent(arrayValue)}`) |
| | | .join('&'); |
| | | } |
| | | return `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`; |
| | | }) |
| | | .join('&'); |
| | | } |
| | | |
| | | var http = { |
| | |
| | | * @param {object} params 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | get: function(url, params={}, config={}) { |
| | | get: function (url, params = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | axios({ |
| | | method: 'get', |
| | |
| | | * @param {object} data 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | post: function(url, data={}, config={}) { |
| | | post: function (url, data = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | axios({ |
| | | method: 'post', |
| | |
| | | }).then((response) => { |
| | | resolve(response.data); |
| | | }).catch((error) => { |
| | | if(error.status == 400) { |
| | | if (error.status == 400) { |
| | | ElMessage({ |
| | | message: error.data.msg, |
| | | type: 'warning', |
| | | }) |
| | | }else { |
| | | message: error.data.msg, |
| | | type: 'warning', |
| | | }) |
| | | } else { |
| | | reject(error); |
| | | } |
| | | }) |
| | |
| | | * @param {object} data 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | postJ: function(url, data={}, config={}) { |
| | | postJ: function (url, data = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | console.log(qsStringify(data)) |
| | | axios({ |
| | | method: 'post', |
| | | url: url, |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }, |
| | | data: qsStringify(data), |
| | | ...config |
| | | }).then((response) => { |
| | |
| | | * @param {object} data 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | put: function(url, data={}, config={}) { |
| | | put: function (url, data = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | axios({ |
| | | method: 'put', |
| | |
| | | * @param {object} data 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | patch: function(url, data={}, config={}) { |
| | | patch: function (url, data = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | axios({ |
| | | method: 'patch', |
| | |
| | | * @param {object} data 请æ±åæ° |
| | | * @param {object} config åæ° |
| | | */ |
| | | delete: function(url, data={}, config={}) { |
| | | delete: function (url, data = {}, config = {}) { |
| | | return new Promise((resolve, reject) => { |
| | | axios({ |
| | | method: 'delete', |
| | |
| | | }).then((response) => { |
| | | resolve(response.data); |
| | | }).catch((error) => { |
| | | if(error.status == 400) { |
| | | if (error.status == 400) { |
| | | ElMessage({ |
| | | message: error.data.msg, |
| | | type: 'warning', |
| | | }) |
| | | }else { |
| | | message: error.data.msg, |
| | | type: 'warning', |
| | | }) |
| | | } else { |
| | | reject(error); |
| | | } |
| | | }) |
| | |
| | | * @param {string} url æ¥å£å°å |
| | | * @param {string} name JSONPåè°å½æ°åç§° |
| | | */ |
| | | jsonp: function(url, name='jsonp'){ |
| | | jsonp: function (url, name = 'jsonp') { |
| | | return new Promise((resolve) => { |
| | | var script = document.createElement('script') |
| | | var _id = `jsonp${Math.ceil(Math.random() * 1000000)}` |
| | | script.id = _id |
| | | script.type = 'text/javascript' |
| | | script.src = url |
| | | window[name] =(response) => { |
| | | window[name] = (response) => { |
| | | resolve(response) |
| | | document.getElementsByTagName('head')[0].removeChild(script) |
| | | try { |
| | | delete window[name]; |
| | | }catch(e){ |
| | | } catch (e) { |
| | | window[name] = undefined; |
| | | } |
| | | } |
| | |
| | | ref="table" :params="params" :apiObj="apiObj" |
| | | @selection-change="selectionChange" stripe> |
| | | <el-table-column type="selection" width="50"></el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" prop="code" width="120" |
| | | sortable='custom'></el-table-column> |
| | | <el-table-column label="å·¥ä½åç§°" prop="name" width="120" |
| | | sortable='custom'></el-table-column> |
| | | <el-table-column label="å·¥ä½ç±»å" prop="type" width="120" |
| | | sortable='custom'></el-table-column> |
| | | <el-table-column label="工使¥å" prop="calendarName" width="120" |
| | | sortable='custom'></el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" prop="code" width="120"></el-table-column> |
| | | <el-table-column label="å·¥ä½åç§°" prop="name" width="120"></el-table-column> |
| | | <el-table-column label="å·¥ä½ç±»å" prop="type" width="120"></el-table-column> |
| | | <el-table-column label="工使¥å" prop="calendarName" width="120"></el-table-column> |
| | | <el-table-column label="æä½" fixed="right" align="right" width="160"> |
| | | <template #default="scope"> |
| | | <el-button-group> |
| | |
| | | <el-container> |
| | | <el-header> |
| | | <span>ééä¿¡æ¯</span> |
| | | <el-button @click="editFlag = !editFlag" style="margin-left: auto;" text type="primary" size="small">é
置工ä½éé</el-button> |
| | | <el-button v-show="editFlag" @click="saveInfo" text type="primary" size="small">ä¿å</el-button> |
| | | <el-button text type="primary" size="small">ä¿®æ¹DMPé
ç½®</el-button> |
| | | <el-button @click="editFlag = !editFlag" |
| | | style="margin-left: auto;" text type="primary" |
| | | size="small">é
置工ä½éé</el-button> |
| | | <el-button v-show="editFlag" @click="saveInfo" text |
| | | type="primary" size="small">ä¿å</el-button> |
| | | <el-button text type="primary" |
| | | size="small">ä¿®æ¹DMPé
ç½®</el-button> |
| | | </el-header> |
| | | <el-main> |
| | | <el-table :data="list" height="200px"> |
| | | <el-table-column label="ééåéåç§°" prop="name" /> |
| | | <el-table-column label="å·¥ä½åéåç§°" prop="dataItem"> |
| | | <template #default="scope"> |
| | | <el-input :disabled="!editFlag" v-model="scope.row.dataItem"></el-input> |
| | | <el-input :disabled="!editFlag" |
| | | v-model="scope.row.dataItem"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ°æ®æ ç¾" prop="description"> |
| | | <template #default="scope"> |
| | | <el-select :disabled="!editFlag" v-model="scope.row.description"> |
| | | <el-option v-for="item in workstation_param_type" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey-0" /> |
| | | <el-select :disabled="!editFlag" |
| | | v-model="scope.row.description"> |
| | | <el-option |
| | | v-for="item in workstation_param_type" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey - 0" /> |
| | | </el-select> |
| | | <!-- {{ dmp_data_type.find(v => v.dictKey == scope.row.wcsDataType)?.dictValue }} --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ°æ®ç±»å«" prop="wcsDataType"> |
| | | <template #default="scope"> |
| | | <el-select disabled v-model="scope.row.wcsDataType"> |
| | | <el-option v-for="item in dmp_data_type" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey-0" /> |
| | | <el-select disabled |
| | | v-model="scope.row.wcsDataType"> |
| | | <el-option v-for="item in dmp_data_type" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey - 0" /> |
| | | </el-select> |
| | | <!-- {{ dmp_data_type.find(v => v.dictKey == scope.row.wcsDataType)?.dictValue }} --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="大å±" prop="bigScreen"> |
| | | <template #default="scope"> |
| | | <el-checkbox :disabled="!editFlag" v-model="scope.row.bigScreen" /> |
| | | <el-checkbox :disabled="!editFlag" |
| | | v-model="scope.row.bigScreen" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="宿¶æ°æ®" prop="realTimeData"> |
| | | <template #default="scope"> |
| | | <el-checkbox :disabled="!editFlag" v-model="scope.row.realTimeData" /> |
| | | <el-checkbox :disabled="!editFlag" |
| | | v-model="scope.row.realTimeData" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="è¿ç¨åæ°" prop="processParameter"> |
| | | <template #default="scope"> |
| | | <el-checkbox :disabled="!editFlag" v-model="scope.row.processParameter" /> |
| | | <el-checkbox :disabled="!editFlag" |
| | | v-model="scope.row.processParameter" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-col :span="8"> |
| | | <ul class="workbench"> |
| | | <li v-for="item in workbenchVOList" :key="item.sort"> |
| | | {{`ã${item.sort}ã`}}{{item.name}} |
| | | {{ `ã${item.sort}ã` }}{{ item.name }} |
| | | </li> |
| | | </ul> |
| | | </el-col> |
| | |
| | | this.search() |
| | | }) |
| | | }, |
| | | saveInfo () { |
| | | this.$HTTP.post('/api/blade-cps/workstation-wcs/save',this.workbenchVOList).then(res => { |
| | | saveInfo() { |
| | | this.$HTTP.post('/api/blade-cps/workstation-wcs/save', this.workbenchVOList).then(res => { |
| | | this.editFlag = false |
| | | }) |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .workbench { |
| | | list-style: none; |
| | | } |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-23 19:45:06 |
| | | * @LastEditTime: 2024-04-27 23:31:53 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue |
| | | --> |
| | | <template> |
| | |
| | | type: 'category', |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: (value) => { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | }, |
| | | dataZoom: [ |
| | | { type: 'slider' } |
| | |
| | | } |
| | | option2.dataset.source = [['product', 'çæ¬¡1', 'çæ¬¡2']] |
| | | res.data.items.records.forEach(v => { |
| | | option2.dataset.source.push([v.workstationName, v.data[1] === '-' ? 0 : v.data[1], v.data[2] === '-' ? 0 : v.data[2]]) |
| | | option2.dataset.source.push([v.workstationName, v.data[1] === '-' ? 0 : v.data[1] * 100, v.data[2] === '-' ? 0 : v.data[2] * 100]) |
| | | }); |
| | | this.option2 = option2 |
| | | console.log(option2) |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-23 19:44:57 |
| | | * @LastEditTime: 2024-04-27 23:30:06 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue |
| | | --> |
| | | <template> |
| | |
| | | xAxis: { |
| | | type: 'category', |
| | | axisLabel: { |
| | | interval: 'auto' |
| | | interval: 'auto', |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: (value) => { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | }, |
| | | dataZoom: [ |
| | | { type: 'slider' } |
| | |
| | | res.data.items.records.forEach(v => { |
| | | let current = [v.id] |
| | | Object.keys(v.nameData).forEach(key => { |
| | | current.push(row.data[key] - 0) |
| | | current.push((v.data[key] - 0) * 100) |
| | | }) |
| | | option2.dataset.source.push(current) |
| | | }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-27 20:02:44 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-27 22:21:36 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/MachineGroup.vue |
| | | --> |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="200px" v-loading="showGrouploading"> |
| | | <el-container> |
| | | <el-main class="nopadding"> |
| | | <el-tree ref="group" node-key="id" :data="group" :current-node-key="form.id" |
| | | :highlight-current="true" :expand-on-click-node="false" default-expand-all |
| | | @node-click="groupClick"></el-tree> |
| | | </el-main> |
| | | </el-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-header> |
| | | <div class="left-panel"> |
| | | <el-button @click="addChild" type="primary" plain>æ°å¢ä¸çº§</el-button> |
| | | <el-button :disabled="!form.id" @click="del" type="danger" plain>å é¤</el-button> |
| | | </div> |
| | | </el-header> |
| | | <el-main class=""> |
| | | <el-form :model="form" :rules="rules" ref="dialogForm" label-width="200px" label-position="left"> |
| | | <el-form-item label="ä¸çº§ç®å½" prop="parentName"> |
| | | <el-input disabled style="width: 240px" v-model="form.parentName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æºå¨ç»åç§°" prop="name"> |
| | | <el-input :disabled="(form.id === '102' || form.id === '2')" style="width: 240px" |
| | | v-model="form.name" clearable></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button @click="save" v-show="!(form.id === '102' || form.id === '2')" style="width: 100px" |
| | | type="primary" plain>ä¿å</el-button> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | group: [], |
| | | form: { |
| | | code: '', |
| | | name: '', |
| | | id: '', |
| | | groupType: '', |
| | | groupCategory: '', |
| | | parentName: '', |
| | | parentId: '', |
| | | }, |
| | | disabled: false, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeData() |
| | | }, |
| | | methods: { |
| | | getTreeData() { |
| | | this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => { |
| | | if (res.code === 200) { |
| | | this.group = res.data |
| | | this.groupClick(res.data[0]) |
| | | } |
| | | }) |
| | | }, |
| | | groupClick(node, node1) { |
| | | console.log(node, node1?.parent?.data?.name) |
| | | this.disabled = false |
| | | Object.keys(this.form).forEach(item => { |
| | | this.form[item] = node[item] |
| | | }) |
| | | if (node1?.parent?.data?.name) { |
| | | this.form.parentName = node1?.parent?.data?.name |
| | | } |
| | | if (node.id === '102' || node.id === '2') { |
| | | this.form.parentName = node.name |
| | | this.disabled = true |
| | | } |
| | | }, |
| | | addChild() { |
| | | if (!this.form.id) { |
| | | return |
| | | } |
| | | let { name, id, groupType, groupCategory } = this.form |
| | | this.form.id = '' |
| | | this.form.name = '' |
| | | this.form.code = '' |
| | | this.form.groupType = groupType |
| | | this.form.groupCategory = groupCategory |
| | | this.form.parentName = name |
| | | this.form.parentId = id |
| | | }, |
| | | del() { |
| | | this.$confirm( |
| | | '确认å é¤è¯¥æºå¨ç»ï¼', |
| | | { |
| | | distinguishCancelAndClose: true, |
| | | confirmButtonText: 'å é¤', |
| | | cancelButtonText: 'åæ¶', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.$HTTP.delete('/api/blade-cps/group/deleteGroup', {}, { params: { groupId: this.form.id } }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success("æä½æå"); |
| | | this.getTreeData() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.success("åæ¶æä½"); |
| | | }) |
| | | |
| | | }, |
| | | save() { |
| | | this.group = [] |
| | | this.$HTTP.post('/api/blade-cps/group', this.form).then(res => { |
| | | if (res.code === 200) { |
| | | this.getTreeData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-27 20:04:34 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-27 21:51:12 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/MachineTab.vue |
| | | --> |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="200px" v-loading="showGrouploading"> |
| | | <el-container> |
| | | <el-main class="nopadding"> |
| | | <el-tree ref="group" default-expand-all node-key="id" :data="group" |
| | | :current-node-key="params.groupId" :highlight-current="true" @node-click="nodeClick"></el-tree> |
| | | </el-main> |
| | | </el-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-header> |
| | | <div class="left-panel"> |
| | | <el-button size="small" @click="table_add" type="primary" icon="el-icon-plus"></el-button> |
| | | <el-button size="small" type="danger" plain icon="el-icon-delete" @click="batchDel"></el-button> |
| | | <!-- <el-button type="primary" plain>导å
¥</el-button> |
| | | <el-button type="primary" plain>æ¹éæä½</el-button> --> |
| | | </div> |
| | | <div class="right-panel"> |
| | | <div class="right-panel-search"> |
| | | <span>ç±»å</span> |
| | | <el-select size="small" v-model="params.machineTypeId" style="width: 240px"> |
| | | <el-option size="small" v-for="item in types" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | <span>ç¶æ</span> |
| | | <el-select size="small" v-model="params.status" style="width: 240px"> |
| | | <el-option size="small" v-for="item in status" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | <el-input size="small" v-model="params.machineName" style="width: 240px" placeholder="请è¾å
¥æºå¨åç§°" |
| | | clearable></el-input> |
| | | <el-button size="small" @click="search" type="primary" icon="el-icon-search"></el-button> |
| | | </div> |
| | | </div> |
| | | </el-header> |
| | | <el-main class="nopadding"> |
| | | <scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" |
| | | :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe> |
| | | <el-table-column type="selection" width="50"></el-table-column> |
| | | <el-table-column label="æºå¨ç¼å·" prop="machineCode" width="120"></el-table-column> |
| | | <el-table-column label="æºå¨åç§°" prop="machineName" width="120"></el-table-column> |
| | | <el-table-column label="æå±æºå¨ç»" prop="groupName" width="120"></el-table-column> |
| | | <el-table-column label="æºå¨ç±»å" prop="machineTypeName" width="120"></el-table-column> |
| | | <el-table-column label="æºå¨åºåå·" prop="serialNo" width="120"></el-table-column> |
| | | <el-table-column label="çç¼å·" prop="shortCode" width="120"></el-table-column> |
| | | <el-table-column label="æºå¨è§æ ¼" prop="machineModel" width="120"></el-table-column> |
| | | <el-table-column label="使ç¨ç¶æ" prop="machineUseStatusName" width="120"></el-table-column> |
| | | <el-table-column label="æä½" fixed="right" align="right" width="160"> |
| | | <template #default="scope"> |
| | | <el-button-group> |
| | | <el-button text type="primary" size="small" |
| | | @click="table_edit(scope.row, scope.$index)">ç¼è¾</el-button> |
| | | <el-popconfirm title="ç¡®å®å é¤åï¼" @confirm="table_del(scope.row, scope.$index, '0')"> |
| | | <template #reference> |
| | | <el-button text type="primary" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |
| | | </scTable> |
| | | |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | apiObj: this.$API.machineManagement.getList, |
| | | group: [], |
| | | treeCheckKey: '', |
| | | params: { |
| | | groupId: '', |
| | | machineCode: '', |
| | | machineName: '', |
| | | machineTypeId: '', |
| | | status: 1, |
| | | }, |
| | | status: [ |
| | | { |
| | | label: 'å¯ç¨', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'åç¨', |
| | | value: 0 |
| | | } |
| | | ], |
| | | types: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeData() |
| | | }, |
| | | methods: { |
| | | getTreeData() { |
| | | this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => { |
| | | if (res.code === 200) { |
| | | this.group = res.data |
| | | this.params.groupId = res.data[0].id |
| | | } |
| | | }) |
| | | }, |
| | | nodeClick(node) { |
| | | this.params.groupId = node.id |
| | | }, |
| | | search() { |
| | | this.$refs.table.reload(this.params) |
| | | }, |
| | | table_add() { |
| | | this.$router.push(`/tpm/machine/create`); |
| | | }, |
| | | batchDel() { }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-main> |
| | | <el-card shadow="never"> |
| | | <el-tabs tab-position="top" class="custom-tabs" v-model="activeName"> |
| | | <el-tab-pane label="æºå¨å°è´¦" name="1"> |
| | | <Machine></Machine> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æºå¨ç»" name="2"> |
| | | <MachineGroup></MachineGroup> |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | </el-card> |
| | | <!-- <Dialog ref="dialog" @success="success" :option="{ types, status, group }"></Dialog> --> |
| | | </el-main> |
| | | </template> |
| | | |
| | | <script> |
| | | import pmsPng from '@/assets/pms.png' |
| | | // import Dialog from './Dialog.vue' |
| | | import MachineGroup from './MachineGroup.vue' |
| | | import Machine from './MachineTab.vue' |
| | | export default { |
| | | name: 'system', |
| | | components: { |
| | | // Dialog, |
| | | MachineGroup, |
| | | Machine |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: '1', |
| | | } |
| | | }, |
| | | watch: { |
| | | activeName: { |
| | | handler(val) { |
| | | // this.queryList().then(() => { |
| | | // if (val == 1) { |
| | | // console.log('>>>>>>>>>>>>>>', this.treeCheckedNode) |
| | | // this.apiObj = this.$API.workstation.getList |
| | | // this.params = { |
| | | // groupId: this.treeCheckedNode.id, |
| | | // keyWord: '', |
| | | // status: 1, |
| | | // type: '' |
| | | // } |
| | | // this.groupClick1(this.treeCheckedNode) |
| | | // } |
| | | // }) |
| | | }, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | created() { |
| | | // this.init() |
| | | // this.queryList() |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .show-info { |
| | | list-style: none; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .preview-title { |
| | | padding: 12px; |
| | | margin-bottom: 14px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .preview-content { |
| | | font-size: 14px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .img { |
| | | width: 30%; |
| | | } |
| | | |
| | | ul { |
| | | list-style: none; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | |
| | | li { |
| | | width: 50%; |
| | | flex: 1 0 auto; |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .workbench { |
| | | list-style: none; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-27 21:44:20 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-27 21:45:27 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/machine/create.vue |
| | | --> |
| | | <template> |
| | | <el-main> |
| | | <el-card shadow="never"> |
| | | æ°å¢ |
| | | </el-card> |
| | | </el-main> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |