| | |
| | | "element-ui": "2.13.2", |
| | | "jquery": "^3.6.0", |
| | | "js-cookie": "2.2.0", |
| | | "lib-flexible": "^0.3.2", |
| | | "lib-flexible-computer": "^1.0.2", |
| | | "normalize.css": "7.0.0", |
| | | "nprogress": "0.2.0", |
| | | "path-to-regexp": "2.4.0", |
| | | "postcss-px2rem": "^0.3.0", |
| | | "vue": "2.6.10", |
| | | "vue-router": "3.0.6", |
| | | "vuex": "3.1.0" |
| | |
| | | "eslint-plugin-vue": "6.2.2", |
| | | "html-webpack-plugin": "3.2.0", |
| | | "mockjs": "1.0.1-beta3", |
| | | "px2rem-loader": "^0.1.9", |
| | | "runjs": "4.3.2", |
| | | "sass": "1.26.8", |
| | | "sass-loader": "8.0.2", |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æå±è½¦é´æ¥æ¾æå±äº§çº¿æ¥å£ |
| | | export function WorkShopSelectLine(data) { |
| | | return request({ |
| | | url: 'BasicSetting/WorkShopSelectLine', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | |
| | | Vue.prototype.$headerCellStyle = headerCellStyle() // 设置å
¨å±è¡¨å¤´æ ·å¼ |
| | | Vue.prototype.$cellStyle = cellStyle() // 设置å
¨å±è¡¨ä½æ ·å¼ |
| | | |
| | | // import 'lib-flexible' // é¿éå¯ä¼¸ç¼©å¸å±æ¹æ¡ |
| | | // import 'lib-flexible-computer' |
| | | |
| | | new Vue({ |
| | | el: '#app', |
| | | router, |
| | |
| | | } |
| | | return option |
| | | } |
| | | |
| | | // å¤çè¡¨æ ¼åå
æ ¼æ ·å¼ |
| | | export function cellStyle() { |
| | | const option = { |
| | |
| | | } |
| | | return option |
| | | } |
| | | |
| | | // æ¶é´å¤ç彿° |
| | | export function handleDatatime(value) { |
| | | const data = new Date(value) |
| | | const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1 |
| | | const date = data.getDate() <= 9 ? '0' + data.getDate() : data.getDate() |
| | | return data.getFullYear() + '-' + month + '-' + date |
| | | } |
| | |
| | | :data="tableData" |
| | | border |
| | | stripe |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | |
| | | |
| | | <!-- æ°å¢ä¿®æ¹å¯¹è¯æ¡--> |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | }, |
| | |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | ::v-deep .el-form-item{ |
| | | .body ::v-deep .el-form-item{ |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | :height="tableHeight" |
| | | stripe |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | ::v-deep .el-form-item { |
| | | .body ::v-deep .el-form-item{ |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | |
| | | :data="tableData" |
| | | border |
| | | stripe |
| | | :height="tableHeight" |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | :header-cell-style="this.$headerCellStyle" |
| | |
| | | |
| | | <!-- ç¨æ·æ¸
åæ°å¢ãä¿®æ¹--> |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | }, |
| | |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | ::v-deep .el-form-item{ |
| | | .body ::v-deep .el-form-item{ |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | highlight-current-row |
| | | :height="tableHeight" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | <el-form-item label="ç»ç»ç±»å" prop="OrgType"> |
| | | <el-radio-group |
| | | v-model="dialogForm.OrgType" |
| | | style="display: flex; align-items: center; height: 40px;" |
| | | |
| | | @change="changeRadio" |
| | | > |
| | | <el-radio |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | ::v-deep .el-form-item{ |
| | | .body ::v-deep .el-form-item{ |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | |
| | | // } |
| | | const mPattern = /^\w+$/ // æ£å çä»·äº[A-Za-z0-9_] |
| | | |
| | | if (value.length < 5) { |
| | | callback(new Error('è´¦å·é¿åº¦ä¸å°äºäºä½ï¼')) |
| | | if (value.length < 1) { |
| | | callback(new Error('è´¦å·ä¸è½ä¸ºç©ºï¼')) |
| | | } else if (!mPattern.test(value)) { |
| | | callback(new Error('è´¦å·ä¸ç¬¦åè§åï¼å¯è¾å
¥åæ¯ãæ°ååä¸å线')) |
| | | } else { |
| | |
| | | } |
| | | } |
| | | const validatePassword = (rule, value, callback) => { |
| | | if (value.length < 6) { |
| | | callback(new Error('å¯ç é¿åº¦ä¸å°äºå
ä½ï¼')) |
| | | if (value.length < 1) { |
| | | callback(new Error('å¯ç é¿åº¦ä¸è½ä¸ºç©ºï¼')) |
| | | } else { |
| | | callback() |
| | | } |
| | |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | :height="tableHeight" |
| | | stripe |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | :style="{width: 100+'%',height:(tableHeight-50)+'px'}" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="input_date" |
| | | label="æå
¥æ¶é´" |
| | | label="æå
¥æ¥æ" |
| | | sortable="custom" |
| | | width="120" |
| | | > |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">ä¿®æ¹</el-button> |
| | | <el-button type="text" @click="del(row.id)">å é¤</el-button> |
| | | <el-button type="text" @click="del(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <!--è®¾å¤æ¸
åæ°å¢ç¼è¾--> |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="设å¤ç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-form-item label="设å¤ç¼ç " prop="devicecode"> |
| | | <el-input v-model="dialogForm.devicecode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="设å¤åç§°" prop="devicename"> |
| | | <el-input v-model="dialogForm.devicename" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç±»å" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="设å¤ç±»å" prop="devicetypecode"> |
| | | <el-select v-model="dialogForm.devicetypecode" style="width: 220px" placeholder="è¯·éæ©" @change="devicetypecodeChange"> |
| | | <el-option |
| | | v-for="item in DeviceTypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç»" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="设å¤ç»" prop="devicegroupcode"> |
| | | <el-select v-model="dialogForm.devicegroupcode" :disabled="dialogForm.devicetypecode===''" style="width: 220px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in DeviceGroupArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå
¥æ¥æ" prop="OrgName"> |
| | | <el-form-item label="æå
¥æ¥æ" prop="importdate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.OrgCode" |
| | | v-model="dialogForm.importdate" |
| | | style="width: 220px" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æå±è½¦é´" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="æå±è½¦é´" prop="workshopcode"> |
| | | <el-select v-model="dialogForm.workshopcode" style="width: 220px" placeholder="è¯·éæ©" @change="workshopcodeChange"> |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå±äº§çº¿" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="æå±äº§çº¿" prop="linecode"> |
| | | <el-select v-model="dialogForm.linecode" :disabled="dialogForm.workshopcode===''" style="width: 220px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in WorkLineArr" |
| | | :key="item.linecode" |
| | | :label="item.linename" |
| | | :value="item.linecode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="使ç¨ç¶æ" prop="OrgName"> |
| | | <el-select v-model="form.Status" placeholder="è¯·éæ©"> |
| | | <el-form-item label="使ç¨ç¶æ" prop="status"> |
| | | <el-select v-model="dialogForm.status" style="width: 220px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in StatusArr" |
| | | :key="item.value" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="稼å¨ç" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="稼å¨ç" prop="ratio"> |
| | | <el-input v-model="dialogForm.ratio" style="width: 195px" /><span style="margin-left: 10px">%</span> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-input v-if="row.isVisible===1" v-model="row.eqptype_code" placeholder="请è¾å
¥" />--> |
| | | <el-select v-if="row.isVisible===1" v-model="row.eqptype_code" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in DeviceTypeArr" |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { |
| | | AddUpdateOrganization, |
| | | DeleteOrganization, |
| | | OrganizationSearch, |
| | | PrentOrganization, |
| | | RoleTypeDelete |
| | | } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { |
| | | AddUpdateDeviceGroup, |
| | | AddUpdateDeviceType, DeleteDeviceType, |
| | | AddUpdateDeviceGroup, AddUpdateDeviceManger, |
| | | AddUpdateDeviceType, DeleteDeviceManger, DeleteDeviceType, |
| | | DeviceGroupSearch, |
| | | DeviceMangerSearch, |
| | | DeviceTypeSearch, |
| | | DeviceTypeSelect, |
| | | DeviceTypeSelectGroup, |
| | | WorkShopSelect |
| | | WorkShopSelect, WorkShopSelectLine |
| | | } from '@/api/sbgl' |
| | | import { handleDatatime } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateTypeCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('è¯·éæ©ä¸çº§')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | id: '', |
| | | devicecode: '', |
| | | devicename: '', |
| | | devicetypecode: '', |
| | | devicegroupcode: '', |
| | | importdate: '', |
| | | workshopcode: '', |
| | | linecode: '', |
| | | status: '', |
| | | ratio: '' |
| | | }, |
| | | WorkLineArr: [], // æå±äº§çº¿æ°ç» |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | devicecode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | devicename: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | devicetypecode: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | devicegroupcode: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤ç»', trigger: ['blur', 'change'] } |
| | | ], |
| | | importdate: [ |
| | | { required: true, message: 'è¯·éæ©æå
¥æ¥æ', trigger: ['blur', 'change'] } |
| | | ], |
| | | workshopcode: [ |
| | | { required: true, message: 'è¯·éæ©æå±è½¦é´', trigger: ['blur', 'change'] } |
| | | ], |
| | | linecode: [ |
| | | { required: true, message: 'è¯·éæ©æå±äº§çº¿', trigger: ['blur', 'change'] } |
| | | ], |
| | | status: [ |
| | | { required: true, message: 'è¯·éæ©ä½¿ç¨ç¶æ', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | DeviceTypeDialogVisible: false, |
| | |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | // console.log(row) |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | this.dialogForm.id = row.id |
| | | this.dialogForm.devicecode = row.code |
| | | this.dialogForm.devicename = row.name |
| | | this.dialogForm.devicetypecode = row.eqptype_code |
| | | this.dialogForm.devicegroupcode = row.eqpgroup_code |
| | | this.dialogForm.importdate = row.input_date |
| | | this.dialogForm.workshopcode = row.wksp_code |
| | | this.dialogForm.linecode = row.Line_code |
| | | this.dialogForm.status = row.enable |
| | | this.dialogForm.ratio = row.operation_ration |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(id) { |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | // DeleteOrganization({ orgid: id }).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success('å 餿å!') |
| | | // this.getDeviceMangerSearch() |
| | | // } |
| | | // }) |
| | | DeleteDeviceManger({ devicecode: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getDeviceMangerSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.dialogForm.id = '' |
| | | this.dialogForm.devicecode = '' |
| | | this.dialogForm.devicename = '' |
| | | this.dialogForm.devicetypecode = '' |
| | | this.dialogForm.devicegroupcode = '' |
| | | this.dialogForm.importdate = '' |
| | | this.dialogForm.workshopcode = '' |
| | | this.dialogForm.linecode = '' |
| | | this.dialogForm.status = '' |
| | | this.dialogForm.ratio = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡æå±è½¦é´ä¸æéæ©æ¹åæ¶ |
| | | async workshopcodeChange(val) { |
| | | const { data: res } = await WorkShopSelectLine({ workshopcode: val }) |
| | | this.WorkLineArr = res |
| | | this.dialogForm.linecode = '' |
| | | }, |
| | | // å¯¹è¯æ¡è®¾å¤ç±»å䏿鿩æ¹åæ¶ |
| | | async devicetypecodeChange(val) { |
| | | const { data: res } = await DeviceTypeSelectGroup({ eqptypecode: val }) |
| | | this.DeviceGroupArr = res |
| | | this.dialogForm.devicegroupcode = '' |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | id: this.dialogForm.id, |
| | | devicecode: this.dialogForm.devicecode, |
| | | devicename: this.dialogForm.devicename, |
| | | devicetypecode: this.dialogForm.devicetypecode, |
| | | devicegroupcode: this.dialogForm.devicegroupcode, |
| | | importdate: handleDatatime(this.dialogForm.importdate), |
| | | workshopcode: this.dialogForm.workshopcode, |
| | | linecode: this.dialogForm.linecode, |
| | | status: this.dialogForm.status, |
| | | ratio: this.dialogForm.ratio, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | AddUpdateDeviceManger(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | }, |
| | |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | ::v-deep .el-form-item{ |
| | | .body ::v-deep .el-form-item{ |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="ç»ç»ç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.OrgCode" placeholder="请è¾å
¥" style="width: calc(100%-30px)" /> |
| | | <el-input v-model="form.OrgCode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»åç§°" style=" display: flex;"> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: calc(100%-30px)" /> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»ç±»å" style=" display: flex;"> |
| | | <el-select v-model="form.OrgType" style="width: calc(100%-30px)" placeholder="è¯·éæ©"> |
| | | <el-select v-model="form.OrgType" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | :key="item.value" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.UserName" style="width: calc(100%-30px)" placeholder="请è¾å
¥" /> |
| | | <el-input v-model="form.UserName" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | border |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ·»å ':'ä¿®æ¹'" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ç»ç»ç±»å" prop="OrgType"> |
| | | <el-radio-group |
| | | v-model="dialogForm.OrgType" |
| | | style="display: flex;align-items: end;height: 29px;" |
| | | @change="changeRadio" |
| | | > |
| | | <el-radio |
| | | v-for="item in OrgTypeArr" |
| | | :key="item.value" |
| | | :value="item.value" |
| | | :label="item.label" |
| | | /> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»ç±»å" prop="OrgType" /> |
| | | <el-form-item label="ç»ç»ç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogFormOrgTypeSelected!=='F'" prop="SupUnit" label="ä¸çº§åä½"> |
| | | <el-form-item prop="SupUnit" label="ä¸çº§åä½"> |
| | | <el-select |
| | | v-model="dialogForm.SupUnit" |
| | | style="width: 220px" |
| | |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | SupUnitArr: [], |
| | | dialogFormOrgTypeSelected: '', |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | |
| | | search() { |
| | | this.getOrganizationSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getOrganizationSearch() |
| | | }, |
| | | // åéæ¡æ¹åæ¶ |
| | | async changeRadio(val) { |
| | | if (val.length > 1) { |
| | | this.OrgTypeArr.forEach(item => { |
| | | if (item.label === val) { |
| | | this.dialogFormOrgTypeSelected = item.value |
| | | } |
| | | }) |
| | | this.dialogForm.SupUnit = '' |
| | | } else { |
| | | this.dialogFormOrgTypeSelected = val |
| | | } |
| | | if (this.dialogFormOrgTypeSelected !== 'F') { |
| | | const { data: res } = await PrentOrganization({ orgcode: this.dialogFormOrgTypeSelected }) |
| | | this.SupUnitArr = res |
| | | } |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | if (row.description === 'F') { |
| | | this.dialogForm.OrgType = 'å·¥å' |
| | | } else if (row.description === 'D') { |
| | | this.dialogForm.OrgType = 'é¨é¨' |
| | | } else if (row.description === 'W') { |
| | | this.dialogForm.OrgType = '车é´' |
| | | } else if (row.description === 'K') { |
| | | this.dialogForm.OrgType = 'ç§å®¤' |
| | | } else if (row.description === 'L') { |
| | | this.dialogForm.OrgType = 'ç产线' |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | | this.changeRadio(this.dialogForm.OrgType) |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | ::v-deep .el-form-item { |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | |
| | | <template /> |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="ä»åºç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.warehousecode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºåç§°" style=" display: flex;"> |
| | | <el-input v-model="form.warehousename" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºæè¿°" style=" display: flex;"> |
| | | <el-input v-model="form.description" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.createuser" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | label="ä»åºç¼ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="ä»åºåç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="ä»åºæè¿°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">ä¿®æ¹</el-button> |
| | | <el-button type="text" @click="del(row.id)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getWareHouseDefSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ä»åºç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºåç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºæè¿°" prop="SupUnit"> |
| | | <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 220px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { WareHouseDefSearch } from '@/api/wlgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Ckdy' |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥ç¼ç ')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('ç¼ç ä¸è½ä¸ºä¸æ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateTypeCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('è¯·éæ©ä¸çº§')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | warehousecode: '', // ä»åºç¼ç |
| | | warehousename: '', // ä»åºåç§° |
| | | description: '', // ä»åºæè¿° |
| | | createuser: '', // å建人å |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 10 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '' |
| | | }, |
| | | dialogFormOrgTypeSelected: '', |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getWareHouseDefSearch() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | async getWareHouseDefSearch() { |
| | | const res = await WareHouseDefSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getWareHouseDefSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getWareHouseDefSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.warehousecode = '' |
| | | this.form.warehousename = '' |
| | | this.form.description = '' |
| | | this.form.createuser = '' |
| | | this.getWareHouseDefSearch() |
| | | }, |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(id) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getWareHouseDefSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganType: this.dialogFormOrgTypeSelected, |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getWareHouseDefSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid $main_color; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .operationClass { |
| | | height: 23px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | </style> |
| | |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 200 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.mainHeight = window.innerHeight - 120 |
| | | // this.mainHeight = window.innerHeight - 200 |
| | | // this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | }, |
| | | handleEcharts() { |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;"> |
| | | <div style="margin-bottom: 20px;"> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div style="display: flex;justify-content: space-around;width: 85%"> |
| | | <el-form-item label="å
¬ç路线"> |
| | | <el-input v-model="form.gylx" placeholder="请è¾å
¥" /> |
| | | <div class="elForm"> |
| | | <el-form-item label="å·¥èºç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.routecode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç "> |
| | | <el-input v-model="form.wlbm" placeholder="请è¾å
¥" /> |
| | | <el-form-item label="å·¥èºåç§°" style=" display: flex;"> |
| | | <el-input v-model="form.routename" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æåç§°"> |
| | | <el-input v-model="form.wlmc" placeholder="请è¾å
¥" /> |
| | | <el-form-item label="å·¥èºæè¿°" style=" display: flex;"> |
| | | <el-input v-model="form.description" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.createuser" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="text" style="display: flex;align-items: start;padding-top: 10px;" @click="reset">éç½® |
| | | </el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | |
| | | <div style="display:flex;"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-delete">ä¿®æ¹</el-button> |
| | | <el-button type="primary" icon="el-icon-delete">å é¤</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upLoad">导å
¥</el-button> |
| | | <el-button type="primary" icon="el-icon-download" @click="downLoad">导åº</el-button> |
| | | </div> |
| | | |
| | | <div style="display: flex;justify-content: end;margin-right: 20px"> |
| | | <el-button type="text" icon="el-icon-document">æ¥çæç工使¥å¿</el-button> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;width: 100%;"> |
| | | <div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData1" |
| | | style="width: 100%;border: 1px solid #eee" |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | border |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <el-table-column type="selection"> |
| | | <!-- <template slot-scope="{row}">--> |
| | | |
| | | <!-- <!– {{ row.isSelect }}–>--> |
| | | |
| | | <!-- <!– <el-radio :key="row.id" v-model="row.id" @change="radioValueChange($event)" />–>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥èºè·¯çº¿" prop="gylx" /> |
| | | <el-table-column show-overflow-tooltip label="ç©æç¼ç " prop="wlbm" /> |
| | | <el-table-column show-overflow-tooltip label="ç©æåç§°" prop="wlmc" /> |
| | | <el-table-column label="ç©æè§æ ¼" prop="wlgg" /> |
| | | <el-table-column label="ç»æè£
ç®±" prop="jszx"> |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | label="ç¼ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="åç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="å·¥èºè·¯çº¿æè¿°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="enable" |
| | | label="使ç¨ç¶æ" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.jszx==='1'">æ¯</div> |
| | | <div v-if="row.jszx==='0'">å¦</div> |
| | | <div v-if="row.enable==='Y'">æ¯</div> |
| | | <div v-if="row.enable==='N'">å¦</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <!-- <el-button type="text" @click="edit('edit',row)">ä¿®æ¹</el-button>--> |
| | | <el-button type="text" @click="del(row.id)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.pageNum" |
| | | :limit.sync="form.pageSize" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | style="padding: 0;margin-top: 10px;" |
| | | @pagination="getRouteSearch" |
| | | /> |
| | | </div> |
| | | <div style="margin:0 20px;width: 71%;"> |
| | | <el-table |
| | | :data="tableData2" |
| | | border |
| | | height="500px" |
| | | style="width: 100%;" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column label="" prop="" type="index" /> |
| | | <el-table-column label="å·¥åºç¼ç " prop="gxbm" /> |
| | | <el-table-column label="å·¥åºåç§°" prop="gxmc" /> |
| | | <el-table-column label="å·¥åºæ£éª" prop="gxjy" /> |
| | | <el-table-column label="åå§èæ" prop="csjp" /> |
| | | <el-table-column label="åå§åè
æ°" prop="csxqs" /> |
| | | <el-table-column label="åå§å·¥ä»·" prop="csgj"> |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.csgj }}å
</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¼è¾æä½"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip content="æ°å¢" placement="top"> |
| | | <el-button type="text" icon="el-icon-circle-plus-outline" /> |
| | | </el-tooltip> |
| | | <el-tooltip content="ä¿®æ¹" placement="top"> |
| | | <el-button type="text" icon="el-icon-edit" /> |
| | | </el-tooltip> |
| | | <el-tooltip content="å é¤" placement="top"> |
| | | <el-button type="text" icon="el-icon-delete" /> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
³èå·¥ä½ç«"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip content="å·¥ä½ç«" placement="top"> |
| | | <el-button type="text" icon="el-icon-share" @click="shareClick(row)" /> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div style="height: 100px;border: 1px solid #eee; margin-top: 20px"> |
| | | <div style="margin: 20px;color:#42b983;">å·¥èºè·¯çº¿</div> |
| | | <div> |
| | | <el-steps |
| | | style="display:flex; |
| | | margin-top: -25px; |
| | | justify-content: center;" |
| | | :space="400" |
| | | :active="3" |
| | | align-center |
| | | > |
| | | |
| | | <el-step title="䏿" /> |
| | | <el-step title="çµåå¦" /> |
| | | <el-step title="æ¸
æ´çå¹²" /> |
| | | </el-steps> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="å
³èå·¥ä½ç«" |
| | | :title="operation==='add'?'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="5vh" |
| | | width="80%" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px;"> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> å·¥åºåç§°ï¼{{ dialogGxmc }} |
| | | <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <div style="display: flex"> |
| | | <el-form-item label="å·¥èºç¼ç " prop="OrgCode" style="margin-right: 20px"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºåç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <!-- <template>--> |
| | | <el-radio-group v-model="dialogRadioValue" @change="dialogRadioChange($event)"> |
| | | <el-radio |
| | | v-for="item in dialogContentArr" |
| | | :key="item.id" |
| | | |
| | | :label="item.name" |
| | | border |
| | | size="medium" |
| | | <div style="display: flex"> |
| | | <el-form-item prop="SupUnit" label="使ç¨ç¶æ" style="margin-right: 20px"> |
| | | <el-select |
| | | v-model="dialogForm.isEnable" |
| | | style="width: 220px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in SupUnitArr" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | <!-- v-model="item.id"--> |
| | | </el-radio-group> |
| | | <!-- </template>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºæè¿°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 220px" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="height: 350px;border: 1px solid #eee; margin-top: 20px;overflow-y:scroll"> |
| | | <el-tree |
| | | ref="tree" |
| | | style="margin-left: 10px;" |
| | | :data="treeData" |
| | | show-checkbox |
| | | default-expand-all |
| | | node-key="id" |
| | | highlight-current |
| | | @node-click="nodeClick" |
| | | <el-form-item label="å·¥èºè®¾ç½®" prop="OrgName"> |
| | | <div style="display: flex;width:100%;overflow-y: scroll"> |
| | | <!-- å®ç°å·¥èºè®¾ç½®å¨ææ·»å --> |
| | | <div v-for="(tag,index) in dynamicTags" :key="tag.id" style="display: flex;"> |
| | | <el-tag |
| | | v-if="flag||tag.label!==flagSelected" |
| | | closable |
| | | :disable-transitions="false" |
| | | style="margin-left: 0;width: 100px;" |
| | | :class="tagClass(tag.label)" |
| | | :effect="tag.effect" |
| | | @close="handleTagClose(tag.label)" |
| | | @click="elTagClick(tag)" |
| | | > |
| | | <!-- :props="defaultProps"--> |
| | | {{ tag.label }} |
| | | <i class="el-icon-edit" @click="tagEdit(tag)" /> |
| | | </el-tag> |
| | | |
| | | <div slot-scope="{node,data}" style="display: flex;justify-content: space-between;width: 80%;"> |
| | | <div>{{ node.label.split('&')[0] }}</div> |
| | | <div>{{ node.label.split('&')[1] }}</div> |
| | | <el-autocomplete |
| | | v-if="!flag&&tag.label===flagSelected" |
| | | :ref="'saveTagInput'+tag.id" |
| | | v-model="value" |
| | | class="input-new-tag" |
| | | size="small" |
| | | :fetch-suggestions="querySearch" |
| | | style="margin-left: 0px;width: 100px;transform: translate(1)" |
| | | autofocus |
| | | @select="handleSelect" |
| | | @keyup.enter.native="handleInputConfirm2" |
| | | /> |
| | | <!-- @blur="handleBlur2"--> |
| | | |
| | | <div v-if="index!==dynamicTags.length-1" style="width: 40px;">----></div> |
| | | </div> |
| | | <!-- :disabled="addDisabled"--> |
| | | <el-button type="primary" style="margin-left: 20px;width: 100px;height: 32px;" size="small" @click="showInput">+ |
| | | æ·»å |
| | | </el-button> |
| | | |
| | | </el-tree> |
| | | </div> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import Pagination from '@/components/Pagination' |
| | | import { cellStyle } from '@/utils/global' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { RouteSearch } from '@/api/zzmx' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Gylx', |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥ç¼ç ')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('ç¼ç ä¸è½ä¸ºä¸æ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateTypeCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('è¯·éæ©ä¸çº§')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | pageNum: 1, // 第å 页 |
| | | pageSize: 10, // æ¯é¡µå¤å°æ¡ |
| | | gylx: '', // å
¬ç路线 |
| | | wlbm: '', // ç©æç¼ç |
| | | wlmc: ''// ç©æåç§° |
| | | routecode: '', // å·¥èºè·¯çº¿ç¼ç |
| | | routename: '', // å·¥èºè·¯çº¿åç§° |
| | | description: '', // å·¥èºè·¯çº¿æè¿° |
| | | createuser: '', // å建人å |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 10 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | isEnable: [ |
| | | { label: 'æ¯', value: 'Y' }, |
| | | { label: 'å¦', value: 'N' } |
| | | ], |
| | | total: 10, |
| | | tableData1: [ |
| | | { id: 1, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 2, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 3, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 4, isSelect: true, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: '676端件', wlgg: '676', jszx: '1' }, |
| | | { id: 5, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: '676端件', wlgg: '676', jszx: '1' }, |
| | | { id: 6, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 7, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 8, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 9, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 10, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' } |
| | | ], |
| | | radioValue: '', |
| | | radioValueId: 0, |
| | | tableData2: [ |
| | | { id: 1, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 2, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 3, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 4, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 5, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 6, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' } |
| | | ], |
| | | dialogVisible: false, |
| | | dialogGxmc: '', |
| | | dialogContentArr: [ |
| | | { id: 1, name: 'æºå C41' }, |
| | | { id: 2, name: 'æºå C42' }, |
| | | { id: 3, name: 'æºå C43' }, |
| | | { id: 4, name: 'æºå C44' }, |
| | | { id: 5, name: 'æºå C45' }, |
| | | { id: 6, name: 'æºå C46' }, |
| | | { id: 8, name: 'æºå C47' }, |
| | | { id: 9, name: 'æºå C48' }, |
| | | { id: 10, name: 'æºå C49' }, |
| | | { id: 11, name: 'æºå C50' }, |
| | | { id: 12, name: 'æºå C51' }, |
| | | { id: 13, name: 'GP12å¤è§å
è£
C39' }, |
| | | { id: 14, name: 'Gp12å¤è§æ£æ¸
æ´çå¹²å
è£
C40' }, |
| | | { id: 15, name: 'GP12å¤è§å
è£
C38' }, |
| | | { id: 16, name: 'GP12å¤è§å
è£
C37' }, |
| | | { id: 17, name: 'GP12å¤è§å
è£
C36' }, |
| | | { id: 18, name: 'è¿åè¿ä¿®è½¦é´' }, |
| | | { id: 19, name: '设置ä¼é²åº' }, |
| | | { id: 20, name: 'ç©ºåæºæ¿' } |
| | | ], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | tableData: [], |
| | | dialogVisible: true, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | treeData: [ |
| | | { |
| | | id: 1, |
| | | label: 'éæ©å
¨é¨', |
| | | children: [ |
| | | { |
| | | id: 2, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 3, |
| | | label: 'ä¸çº§ 1-1-1&LKFDL_SC-PC028' |
| | | }, { |
| | | id: 4, |
| | | label: 'ä¸çº§ 1-1-2&LKFDL_SC-PC029' |
| | | dynamicTags: [// å·¥èºè®¾ç½®æ°ç» |
| | | { id: 1, label: 'æ ç¾ä¸', effect: 'light' }, |
| | | { id: 2, label: 'æ ç¾äº', effect: 'light' }, |
| | | { id: 3, label: 'æ ç¾ä¸', effect: 'light' } |
| | | ], |
| | | tagSelectedId: '', // tagéæ©ä¸id |
| | | flag: true, |
| | | flagSelected: '', // 夿æ¯å¦éä¸ |
| | | value: '', |
| | | restaurants: [], |
| | | addDisabled: false, |
| | | |
| | | }, { |
| | | id: 5, |
| | | label: 'ä¸çº§ 1-1-1&LKFDL_SC-PC030' |
| | | }, { |
| | | id: 6, |
| | | label: 'ä¸çº§ 1-1-2&LKFDL_SC-PC031' |
| | | |
| | | }] |
| | | }, |
| | | { |
| | | id: 7, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 8, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC028' |
| | | }, { |
| | | id: 9, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC029' |
| | | |
| | | }, { |
| | | id: 10, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC027' |
| | | }, { |
| | | id: 11, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC026' |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | id: 12, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 13, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC023' |
| | | }, { |
| | | id: 14, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC024' |
| | | |
| | | }, { |
| | | id: 15, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC025' |
| | | }, { |
| | | id: 16, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC026' |
| | | } |
| | | ] |
| | | } |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | } |
| | | |
| | | ], |
| | | dialogRadioValue: '', |
| | | dialogRadioValueId: 0 |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | this.getRouteSearch() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | this.restaurants = this.loadAll() |
| | | }, |
| | | methods: { |
| | | // 导å
¥ |
| | | upLoad() { |
| | | // const isLt100M = param.file.size / 1024 / 1024 < 50 |
| | | // if (!isLt100M) { |
| | | // this.$message('è¯·æ£æ¥ï¼ä¸ä¼ æä»¶å¤§å°ä¸è½è¶
è¿50MB!') |
| | | // return |
| | | querySearch(queryString, cb) { |
| | | var restaurants = this.restaurants |
| | | var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants |
| | | // è°ç¨ callback è¿å建议åè¡¨çæ°æ® |
| | | cb(results) |
| | | }, |
| | | createFilter(queryString) { |
| | | return (restaurant) => { |
| | | return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0) |
| | | } |
| | | }, |
| | | loadAll() { |
| | | return [ |
| | | { 'value': 'ä¸å
¨é²é£ï¼åæ°æ³¾åºï¼', 'address': 'é¿å®åºæ°æ¸è·¯144å·' }, |
| | | { 'value': 'Hot honey é¦å°ç¸é¸¡ï¼ä»éè·¯ï¼', 'address': '䏿µ·å¸é¿å®åºæ·è¹è·¯661å·' }, |
| | | { 'value': 'æ°æºè§è¶é¤å
', 'address': '䏿µ·å¸æ®éåºçåè·¯988å·åééæ²è°·6å·æ¥¼113' }, |
| | | { 'value': 'æ³·åå®¶(天山西路åº)', 'address': '天山西路438å·' }, |
| | | { 'value': 'èä»å¥³çº¸æ¯èç³ï¼ä¸æµ·å空åºï¼', 'address': '䏿µ·å¸é¿å®åºééè·¯968å·1å¹¢18å·æ¥¼ä¸å±åéº18-101' }, |
| | | { 'value': 'è´¡è¶', 'address': '䏿µ·å¸é¿å®åºééè·¯633å·' }, |
| | | { 'value': '豪大大é¦é¸¡æè¶
级奶ç¸', 'address': '䏿µ·å¸åå®åºæ¹å®å
¬è·¯æ¹å®è·¯1685å·' }, |
| | | { 'value': 'è¶èå
°ï¼å¥¶è¶ï¼ææé¥¼ï¼', 'address': '䏿µ·å¸æ®éåºåæ®è·¯1435å·' } |
| | | ] |
| | | }, |
| | | handleSelect(item) { |
| | | console.log(item) |
| | | }, |
| | | handleInputConfirm2() { |
| | | console.log(this.flagSelect, 111) |
| | | // this.dynamicTags.forEach((item,index) => { |
| | | // if (item === this.flagSelect) { |
| | | // console.log(item, 111) |
| | | // item = this.flagSelect |
| | | // } |
| | | // const formData = new FormData() |
| | | // formData.append('file', param.file) |
| | | // formData.append('formId', this.formId) |
| | | // |
| | | // this.loading = true |
| | | // const _self = this |
| | | // uploadTable(formData).then(res => { |
| | | // this.$message(res.data.message) |
| | | // param.data.fbsl = res.data.data.total |
| | | // _self.loading = false |
| | | // this.dataList = JSON.parse(JSON.stringify(this.dataList)) |
| | | // }).catch(() => { |
| | | // _self.loading = false |
| | | // }) |
| | | console.log(this.value) |
| | | this.addDisabled = false |
| | | this.flagSelect = '' |
| | | this.value = '' |
| | | this.flag = !this.flag |
| | | }, |
| | | // å¯¼åº |
| | | async downLoad() { |
| | | // const res = await downFile(row.id) |
| | | // if (res) { |
| | | // // console.log(res) |
| | | // const fileName = row.filename |
| | | // // const fileName = 'æå·å¸æ£å¯å·¥ä½ç»©æè¯ä»·ï¼è¡¨ä¸ï¼' + '.xls' |
| | | // // let blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}) // xlsx |
| | | // // const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) // xls |
| | | // const blob = new Blob([res.data], { type: res.data.type }) // xls |
| | | // if ('download' in document.createElement('a')) { // éIEä¸è½½ |
| | | // const elink = document.createElement('a') |
| | | // elink.download = fileName |
| | | // elink.style.display = 'none' |
| | | // elink.href = URL.createObjectURL(blob) |
| | | // document.body.appendChild(elink) |
| | | // elink.click() |
| | | // URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | // document.body.removeChild(elink) |
| | | // } else { // IE10+ä¸è½½ |
| | | // navigator.msSaveBlob(blob, fileName) |
| | | // } |
| | | // } |
| | | tagEdit(tag) { |
| | | this.addDisabled = true |
| | | this.flagSelect = tag.label |
| | | this.value = tag.label |
| | | this.flag = !this.flag |
| | | this.$nextTick(_ => { |
| | | this.$refs['saveTagInput' + tag.id][0].focus() |
| | | }) |
| | | }, |
| | | radioValueChange(val) { |
| | | console.log(val) |
| | | elTagClick(tag) { |
| | | console.log(tag) |
| | | |
| | | this.tagSelectedId = tag.id |
| | | if (tag.effect === 'dark') { |
| | | tag.effect = 'light' |
| | | this.tagSelectedId = '' |
| | | } else { |
| | | this.dynamicTags.forEach(item => { |
| | | item.effect = 'light' |
| | | }) |
| | | if (tag.effect === 'light') { |
| | | tag.effect = 'dark' |
| | | } else if (tag.effect === 'dark') { |
| | | tag.effect = 'light' |
| | | } |
| | | } |
| | | |
| | | console.log(this.$el) |
| | | // console.log(this.$el.style.color = 'red') |
| | | }, |
| | | |
| | | // å¯¹è¯æ¡ä¸æ¥è¯¢id |
| | | dialogRadioChange(val) { |
| | | this.dialogContentArr.forEach(item => { |
| | | if (item.name === val) { |
| | | this.dialogRadioValueId = item.id |
| | | tagClass() { |
| | | // this.tagSelect.style({ backgroundColor: 'red' }) |
| | | // return { backgroundColor: 'red' } |
| | | }, |
| | | handleTagClose(tag) { |
| | | // this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1) |
| | | this.dynamicTags.forEach((item, index) => { |
| | | if (item.label === tag) { |
| | | console.log(item.label === tag) |
| | | this.dynamicTags.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | nodeClick(obj, node, data) { |
| | | // console.log(obj, node, data) |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤æé® |
| | | dialogVisibleConfirm() { |
| | | // å¾å°çæ å½¢èç¹ |
| | | const treeIdArr = this.$refs.tree.getCheckedKeys() |
| | | // åéæ¡id |
| | | // this.dialogRadioValueId |
| | | |
| | | this.dialogVisible = false |
| | | showInput() { |
| | | // this.inputVisible = true |
| | | this.addDisabled = true |
| | | if (this.tagSelectedId === '' || this.tagSelectedId === this.dynamicTags.length) { |
| | | this.dynamicTags.push( |
| | | { id: (this.dynamicTags.length + 1), label: '', effeft: 'light' } |
| | | ) |
| | | } else { |
| | | console.log(this.tagSelectedId, 31) |
| | | this.dynamicTags.splice(this.tagSelectedId, 0, { id: this.dynamicTags.length + 1, label: '', effect: 'light' }) |
| | | } |
| | | this.flag = !this.flag |
| | | this.$nextTick(_ => { |
| | | this.$refs['saveTagInput' + this.dynamicTags.length ][0].focus() |
| | | }) |
| | | // this.$nextTick(_ => { |
| | | // console.log(this.$refs['saveTagInput'], 321) |
| | | // this.$refs.saveTagInput.$refs.input.focus() |
| | | // }) |
| | | }, |
| | | // å
³èå·¥ä½ç«ç¹å»äºä»¶ |
| | | shareClick(row) { |
| | | async getRouteSearch() { |
| | | const res = await RouteSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getRouteSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getRouteSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getRouteSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.dialogGxmc = row.gxmc |
| | | }, |
| | | // å¯¹è¯æ¡å
³éä¹åå¤ç |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(id) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getRouteSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogRadioValue = '' |
| | | this.$refs.tree.setCheckedKeys([]) |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | this.dialogRadioValue = '' |
| | | this.$refs.tree.setCheckedKeys([]) |
| | | }, |
| | | // éç½®äºä»¶ |
| | | reset() { |
| | | this.form.gylx = '' |
| | | this.form.wlbm = '' |
| | | this.form.wlmc = '' |
| | | }, |
| | | // // å¤ç表头åå
æ ¼æ ·å¼ |
| | | // headerCellStyle() { |
| | | // const option = { |
| | | // background: '#eee', padding: '5px 0' |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganType: this.dialogFormOrgTypeSelected, |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | // AddUpdateOrganization(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | // this.dialogVisible = false |
| | | // this.getRouteSearch() |
| | | // } else { |
| | | // this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | // } |
| | | // return option |
| | | // }, |
| | | // // å¤çè¡¨å¤´è¡æ ·å¼ |
| | | // headerRowStyle() { |
| | | // |
| | | // }, |
| | | // // å¤çè¡¨æ ¼åå
æ ¼æ ·å¼ |
| | | // cellStyle() { |
| | | // // return {padding: '5px 0'} |
| | | // return { padding: '0' } |
| | | // }, |
| | | // æ¥è¯¢äºä»¶ |
| | | async search() { |
| | | const data = this.form |
| | | console.log(data) |
| | | // const res=await xxx(data) |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid $main_color; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | ::v-deep .el-step__head.is-finish { |
| | | color: $main_color; |
| | | border-color: $main_color;; |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-step__title.is-finish { |
| | | color: $main_color; |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-icon-caret-right:before { |
| | | content: '' !important; |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered.is-checked { |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .operationClass { |
| | | height: 23px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | /*::v-deep .el-divider--horizontal{*/ |
| | | /* margin:0 0 10px 0;*/ |
| | | /*}*/ |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;"> |
| | | <div style="margin-bottom: 20px;"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div style="display: flex;justify-content: space-around;width: 85%"> |
| | | <el-form-item label="å
¬ç路线"> |
| | | <el-input v-model="form.gylx" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç "> |
| | | <el-input v-model="form.wlbm" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æåç§°"> |
| | | <el-input v-model="form.wlmc" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="text" style="display: flex;align-items: start;padding-top: 10px;" @click="reset">éç½® |
| | | </el-button> |
| | | </div> |
| | | </el-form> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | |
| | | <div style="display:flex;"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-delete">ä¿®æ¹</el-button> |
| | | <el-button type="primary" icon="el-icon-delete">å é¤</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upLoad">导å
¥</el-button> |
| | | <el-button type="primary" icon="el-icon-download" @click="downLoad">导åº</el-button> |
| | | </div> |
| | | |
| | | <div style="display: flex;justify-content: end;margin-right: 20px"> |
| | | <el-button type="text" icon="el-icon-document">æ¥çæç工使¥å¿</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;width: 100%;"> |
| | | <div> |
| | | <el-table |
| | | :data="tableData1" |
| | | style="width: 100%;border: 1px solid #eee" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column type="selection"> |
| | | <!-- <template slot-scope="{row}">--> |
| | | |
| | | <!-- <!– {{ row.isSelect }}–>--> |
| | | |
| | | <!-- <!– <el-radio :key="row.id" v-model="row.id" @change="radioValueChange($event)" />–>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥èºè·¯çº¿" prop="gylx" /> |
| | | <el-table-column show-overflow-tooltip label="ç©æç¼ç " prop="wlbm" /> |
| | | <el-table-column show-overflow-tooltip label="ç©æåç§°" prop="wlmc" /> |
| | | <el-table-column label="ç©æè§æ ¼" prop="wlgg" /> |
| | | <el-table-column label="ç»æè£
ç®±" prop="jszx"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.jszx==='1'">æ¯</div> |
| | | <div v-if="row.jszx==='0'">å¦</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.pageNum" |
| | | :limit.sync="form.pageSize" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | style="padding: 0;margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | <div style="margin:0 20px;width: 71%;"> |
| | | <el-table |
| | | :data="tableData2" |
| | | border |
| | | height="500px" |
| | | style="width: 100%;" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column label="" prop="" type="index" /> |
| | | <el-table-column label="å·¥åºç¼ç " prop="gxbm" /> |
| | | <el-table-column label="å·¥åºåç§°" prop="gxmc" /> |
| | | <el-table-column label="å·¥åºæ£éª" prop="gxjy" /> |
| | | <el-table-column label="åå§èæ" prop="csjp" /> |
| | | <el-table-column label="åå§åè
æ°" prop="csxqs" /> |
| | | <el-table-column label="åå§å·¥ä»·" prop="csgj"> |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.csgj }}å
</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¼è¾æä½"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip content="æ°å¢" placement="top"> |
| | | <el-button type="text" icon="el-icon-circle-plus-outline" /> |
| | | </el-tooltip> |
| | | <el-tooltip content="ä¿®æ¹" placement="top"> |
| | | <el-button type="text" icon="el-icon-edit" /> |
| | | </el-tooltip> |
| | | <el-tooltip content="å é¤" placement="top"> |
| | | <el-button type="text" icon="el-icon-delete" /> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
³èå·¥ä½ç«"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip content="å·¥ä½ç«" placement="top"> |
| | | <el-button type="text" icon="el-icon-share" @click="shareClick(row)" /> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div style="height: 100px;border: 1px solid #eee; margin-top: 20px"> |
| | | <div style="margin: 20px;color:#42b983;">å·¥èºè·¯çº¿</div> |
| | | <div> |
| | | <el-steps |
| | | style="display:flex; |
| | | margin-top: -25px; |
| | | justify-content: center;" |
| | | :space="400" |
| | | :active="3" |
| | | align-center |
| | | > |
| | | |
| | | <el-step title="䏿" /> |
| | | <el-step title="çµåå¦" /> |
| | | <el-step title="æ¸
æ´çå¹²" /> |
| | | </el-steps> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="å
³èå·¥ä½ç«" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | top="5vh" |
| | | @closed="handleClose" |
| | | > |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px;"> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> å·¥åºåç§°ï¼{{ dialogGxmc }} |
| | | </div> |
| | | <div> |
| | | <!-- <template>--> |
| | | <el-radio-group v-model="dialogRadioValue" @change="dialogRadioChange($event)"> |
| | | <el-radio |
| | | v-for="item in dialogContentArr" |
| | | :key="item.id" |
| | | |
| | | :label="item.name" |
| | | border |
| | | size="medium" |
| | | /> |
| | | <!-- v-model="item.id"--> |
| | | </el-radio-group> |
| | | <!-- </template>--> |
| | | </div> |
| | | <div style="height: 350px;border: 1px solid #eee; margin-top: 20px;overflow-y:scroll"> |
| | | <el-tree |
| | | ref="tree" |
| | | style="margin-left: 10px;" |
| | | :data="treeData" |
| | | show-checkbox |
| | | default-expand-all |
| | | node-key="id" |
| | | highlight-current |
| | | @node-click="nodeClick" |
| | | > |
| | | <!-- :props="defaultProps"--> |
| | | |
| | | <div slot-scope="{node,data}" style="display: flex;justify-content: space-between;width: 80%;"> |
| | | <div>{{ node.label.split('&')[0] }}</div> |
| | | <div>{{ node.label.split('&')[1] }}</div> |
| | | </div> |
| | | |
| | | </el-tree> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import Pagination from '@/components/Pagination' |
| | | import { cellStyle } from '@/utils/global' |
| | | |
| | | export default { |
| | | name: 'Gylx', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | pageNum: 1, // 第å 页 |
| | | pageSize: 10, // æ¯é¡µå¤å°æ¡ |
| | | gylx: '', // å
¬ç路线 |
| | | wlbm: '', // ç©æç¼ç |
| | | wlmc: ''// ç©æåç§° |
| | | }, |
| | | total: 10, |
| | | tableData1: [ |
| | | { id: 1, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 2, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 3, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: 'åé¢F45MnVS20', wlgg: '20', jszx: '1' }, |
| | | { id: 4, isSelect: true, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: '676端件', wlgg: '676', jszx: '1' }, |
| | | { id: 5, isSelect: false, gylx: 'R0145', wlbm: '1403-001-0001', wlmc: '676端件', wlgg: '676', jszx: '1' }, |
| | | { id: 6, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 7, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 8, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 9, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' }, |
| | | { id: 10, isSelect: false, gylx: 'R0145', wlbm: '', wlmc: '', wlgg: '', jszx: '1' } |
| | | ], |
| | | radioValue: '', |
| | | radioValueId: 0, |
| | | tableData2: [ |
| | | { id: 1, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 2, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 3, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 4, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 5, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' }, |
| | | { id: 6, gxbm: 'G0000', gxmc: '䏿', gxjy: 'N', csjp: '10ç§', csxqs: '1', csgj: '1' } |
| | | ], |
| | | dialogVisible: false, |
| | | dialogGxmc: '', |
| | | dialogContentArr: [ |
| | | { id: 1, name: 'æºå C41' }, |
| | | { id: 2, name: 'æºå C42' }, |
| | | { id: 3, name: 'æºå C43' }, |
| | | { id: 4, name: 'æºå C44' }, |
| | | { id: 5, name: 'æºå C45' }, |
| | | { id: 6, name: 'æºå C46' }, |
| | | { id: 8, name: 'æºå C47' }, |
| | | { id: 9, name: 'æºå C48' }, |
| | | { id: 10, name: 'æºå C49' }, |
| | | { id: 11, name: 'æºå C50' }, |
| | | { id: 12, name: 'æºå C51' }, |
| | | { id: 13, name: 'GP12å¤è§å
è£
C39' }, |
| | | { id: 14, name: 'Gp12å¤è§æ£æ¸
æ´çå¹²å
è£
C40' }, |
| | | { id: 15, name: 'GP12å¤è§å
è£
C38' }, |
| | | { id: 16, name: 'GP12å¤è§å
è£
C37' }, |
| | | { id: 17, name: 'GP12å¤è§å
è£
C36' }, |
| | | { id: 18, name: 'è¿åè¿ä¿®è½¦é´' }, |
| | | { id: 19, name: '设置ä¼é²åº' }, |
| | | { id: 20, name: 'ç©ºåæºæ¿' } |
| | | ], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | }, |
| | | treeData: [ |
| | | { |
| | | id: 1, |
| | | label: 'éæ©å
¨é¨', |
| | | children: [ |
| | | { |
| | | id: 2, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 3, |
| | | label: 'ä¸çº§ 1-1-1&LKFDL_SC-PC028' |
| | | }, { |
| | | id: 4, |
| | | label: 'ä¸çº§ 1-1-2&LKFDL_SC-PC029' |
| | | |
| | | }, { |
| | | id: 5, |
| | | label: 'ä¸çº§ 1-1-1&LKFDL_SC-PC030' |
| | | }, { |
| | | id: 6, |
| | | label: 'ä¸çº§ 1-1-2&LKFDL_SC-PC031' |
| | | |
| | | }] |
| | | }, |
| | | { |
| | | id: 7, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 8, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC028' |
| | | }, { |
| | | id: 9, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC029' |
| | | |
| | | }, { |
| | | id: 10, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC027' |
| | | }, { |
| | | id: 11, |
| | | label: 'ä¸çº§ 2-1-1&LKFDL_SC-PC026' |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | id: 12, |
| | | label: 'äºçº§ 1-1', |
| | | children: [{ |
| | | id: 13, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC023' |
| | | }, { |
| | | id: 14, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC024' |
| | | |
| | | }, { |
| | | id: 15, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC025' |
| | | }, { |
| | | id: 16, |
| | | label: 'ä¸çº§ 3-1-1&LKFDL_SC-PC026' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | |
| | | ], |
| | | dialogRadioValue: '', |
| | | dialogRadioValueId: 0 |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | // 导å
¥ |
| | | upLoad() { |
| | | // const isLt100M = param.file.size / 1024 / 1024 < 50 |
| | | // if (!isLt100M) { |
| | | // this.$message('è¯·æ£æ¥ï¼ä¸ä¼ æä»¶å¤§å°ä¸è½è¶
è¿50MB!') |
| | | // return |
| | | // } |
| | | // const formData = new FormData() |
| | | // formData.append('file', param.file) |
| | | // formData.append('formId', this.formId) |
| | | // |
| | | // this.loading = true |
| | | // const _self = this |
| | | // uploadTable(formData).then(res => { |
| | | // this.$message(res.data.message) |
| | | // param.data.fbsl = res.data.data.total |
| | | // _self.loading = false |
| | | // this.dataList = JSON.parse(JSON.stringify(this.dataList)) |
| | | // }).catch(() => { |
| | | // _self.loading = false |
| | | // }) |
| | | }, |
| | | // å¯¼åº |
| | | async downLoad() { |
| | | // const res = await downFile(row.id) |
| | | // if (res) { |
| | | // // console.log(res) |
| | | // const fileName = row.filename |
| | | // // const fileName = 'æå·å¸æ£å¯å·¥ä½ç»©æè¯ä»·ï¼è¡¨ä¸ï¼' + '.xls' |
| | | // // let blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}) // xlsx |
| | | // // const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) // xls |
| | | // const blob = new Blob([res.data], { type: res.data.type }) // xls |
| | | // if ('download' in document.createElement('a')) { // éIEä¸è½½ |
| | | // const elink = document.createElement('a') |
| | | // elink.download = fileName |
| | | // elink.style.display = 'none' |
| | | // elink.href = URL.createObjectURL(blob) |
| | | // document.body.appendChild(elink) |
| | | // elink.click() |
| | | // URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | // document.body.removeChild(elink) |
| | | // } else { // IE10+ä¸è½½ |
| | | // navigator.msSaveBlob(blob, fileName) |
| | | // } |
| | | // } |
| | | }, |
| | | radioValueChange(val) { |
| | | console.log(val) |
| | | }, |
| | | |
| | | // å¯¹è¯æ¡ä¸æ¥è¯¢id |
| | | dialogRadioChange(val) { |
| | | this.dialogContentArr.forEach(item => { |
| | | if (item.name === val) { |
| | | this.dialogRadioValueId = item.id |
| | | } |
| | | }) |
| | | }, |
| | | nodeClick(obj, node, data) { |
| | | // console.log(obj, node, data) |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤æé® |
| | | dialogVisibleConfirm() { |
| | | // å¾å°çæ å½¢èç¹ |
| | | const treeIdArr = this.$refs.tree.getCheckedKeys() |
| | | // åéæ¡id |
| | | // this.dialogRadioValueId |
| | | |
| | | this.dialogVisible = false |
| | | }, |
| | | // å
³èå·¥ä½ç«ç¹å»äºä»¶ |
| | | shareClick(row) { |
| | | this.dialogVisible = true |
| | | this.dialogGxmc = row.gxmc |
| | | }, |
| | | // å¯¹è¯æ¡å
³éä¹åå¤ç |
| | | handleClose() { |
| | | this.dialogRadioValue = '' |
| | | this.$refs.tree.setCheckedKeys([]) |
| | | }, |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | this.dialogRadioValue = '' |
| | | this.$refs.tree.setCheckedKeys([]) |
| | | }, |
| | | // éç½®äºä»¶ |
| | | reset() { |
| | | this.form.gylx = '' |
| | | this.form.wlbm = '' |
| | | this.form.wlmc = '' |
| | | }, |
| | | // // å¤ç表头åå
æ ¼æ ·å¼ |
| | | // headerCellStyle() { |
| | | // const option = { |
| | | // background: '#eee', padding: '5px 0' |
| | | // } |
| | | // return option |
| | | // }, |
| | | // // å¤çè¡¨å¤´è¡æ ·å¼ |
| | | // headerRowStyle() { |
| | | // |
| | | // }, |
| | | // // å¤çè¡¨æ ¼åå
æ ¼æ ·å¼ |
| | | // cellStyle() { |
| | | // // return {padding: '5px 0'} |
| | | // return { padding: '0' } |
| | | // }, |
| | | // æ¥è¯¢äºä»¶ |
| | | async search() { |
| | | const data = this.form |
| | | console.log(data) |
| | | // const res=await xxx(data) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | ::v-deep .el-step__head.is-finish { |
| | | color: $main_color; |
| | | border-color: $main_color;; |
| | | } |
| | | |
| | | ::v-deep .el-step__title.is-finish { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | |
| | | } |
| | | |
| | | ::v-deep .el-icon-caret-right:before { |
| | | content: '' !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | /*::v-deep .el-divider--horizontal{*/ |
| | | /* margin:0 0 10px 0;*/ |
| | | /*}*/ |
| | | </style> |
| | |
| | | outputDir: 'dist', |
| | | assetsDir: 'static', |
| | | lintOnSave: process.env.NODE_ENV === 'development', |
| | | // css: { |
| | | // loaderOptions: { |
| | | // css: {}, |
| | | // postcss: { |
| | | // plugins: [ |
| | | // require('postcss-px2rem')({ |
| | | // remUnit: 192// /设计å¾å®½åº¦/10 |
| | | // }) |
| | | // ] |
| | | // } |
| | | // } |
| | | // }, |
| | | productionSourceMap: false, |
| | | devServer: { |
| | | port: port, |