临时提交

pull/1642/head
648540858 2024-07-15 15:42:15 +08:00
parent 4467684370
commit 92c6a10083
3 changed files with 143 additions and 136 deletions

View File

@ -14,7 +14,7 @@
"axios": "^0.24.0", "axios": "^0.24.0",
"core-js": "^2.6.5", "core-js": "^2.6.5",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-ui": "^2.15.6", "element-ui": "^2.15.14",
"fingerprintjs2": "^2.1.2", "fingerprintjs2": "^2.1.2",
"moment": "^2.29.1", "moment": "^2.29.1",
"ol": "^6.14.1", "ol": "^6.14.1",

View File

@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item label="编码" > <el-form-item label="编码" >
<el-input v-model="form.gbDeviceId" placeholder="请输入通道编码"> <el-input v-model="form.gbDeviceId" placeholder="请输入通道编码">
<el-button slot="append" @click="buildDeviceIdCode"></el-button> <el-button slot="append" @click="buildDeviceIdCode(form.gbDeviceId)"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备厂商" > <el-form-item label="设备厂商" >
@ -212,18 +212,18 @@
</div> </div>
</el-form> </el-form>
<ChannelCode ref="channelCode"></ChannelCode> <channelCode ref="channelCode"></channelCode>
</div> </div>
</template> </template>
<script> <script>
import ChannelCode from './dialog/ChannelCode.vue' import channelCode from './dialog/channelCode'
export default { export default {
name: "channelEdit", name: "channelEdit",
props: [ 'id',], props: [ 'id',],
components: { components: {
ChannelCode, channelCode,
}, },
created() { created() {
// //
@ -266,10 +266,10 @@ export default {
this.locading = false this.locading = false
]) ])
}, },
buildDeviceIdCode: function (){ buildDeviceIdCode: function (gbDeviceId){
this.$refs.channelCode.openDialog(code=>{ this.$refs.channelCode.openDialog(code=>{
this.form.gbDeviceId = code; this.form.gbDeviceId = code;
}); }, gbDeviceId);
} }
// getDeviceChannel:function (callback) { // getDeviceChannel:function (callback) {
// this.$axios({ // this.$axios({

View File

@ -1,134 +1,132 @@
<template> <template>
<div id="channelCode" v-loading="loading">
<el-dialog <el-dialog
title="生成国标编码" title="生成国标编码"
width="65rem" width="60%"
top="2rem" top="2rem"
center
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="showVideoDialog" :visible.sync="showVideoDialog"
:destroy-on-close="true" :destroy-on-close="false"
@close="closeModel()"
> >
<el-tabs v-model="activeKey" centered style="padding: 0 1rem"> <el-tabs v-model="activeKey" style="padding: 0 1rem" @tab-click="getRegionList">
<el-tab-pane name="0" > <el-tab-pane name="0" >
<div slot="label"> <div slot="label" >
<div class="show-code-item">{{ allVal[0].val }}</div> <div class="show-code-item">{{ allVal[0].val }}</div>
<div style="text-align: center">{{ allVal[0].meaning }}</div> <div style="text-align: center">{{ allVal[0].meaning }}</div>
</div> </div>
<el-radio-group v-model="allVal[0].val" :disabled="allVal[0].lock"> <el-radio-group v-model="allVal[0].val" >
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId">--> <el-radio v-for="item in regionList" :key="item.commonRegionId" :label="item.commonRegionDeviceId" style="line-height: 2rem">
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId }}--> {{ item.commonRegionName }} - {{ item.commonRegionDeviceId }}
<!-- </el-radio>--> </el-radio>
<el-radio :label="3">备选项</el-radio>
<el-radio :label="6">备选项</el-radio>
<el-radio :label="9">备选项</el-radio>
</el-radio-group> </el-radio-group>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane name="1">--> <el-tab-pane name="1">
<!-- <div slot="label">--> <div slot="label">
<!-- <div class="show-code-item">{{ allVal[1].val }}</div>--> <div class="show-code-item">{{ allVal[1].val }}</div>
<!-- <div style="text-align: center">{{ allVal[1].meaning }}</div>--> <div style="text-align: center">{{ allVal[1].meaning }}</div>
<!-- </div>-->
<!-- <el-radio-group v-model="allVal[1].val" :disabled="allVal[1].lock">-->
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId.substring(2)">-->
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(2) }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="2">-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[2].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[2].meaning }}</div>-->
<!-- </div>-->
<!-- <el-radio-group v-model="allVal[2].val" :disabled="allVal[2].lock">-->
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId.substring(4)">-->
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(4) }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="3">-->
<!-- 请手动输入基层接入单位编码,两位数字-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[3].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[3].meaning }}</div>-->
<!-- </div>-->
<!-- <el-input-->
<!-- type="text"-->
<!-- placeholder="请输入内容"-->
<!-- v-model="allVal[3].val"-->
<!-- maxlength="2"-->
<!-- :disabled="allVal[3].lock"-->
<!-- show-word-limit-->
<!-- >-->
<!-- </el-input>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="4">-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[4].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[4].meaning }}</div>-->
<!-- </div>-->
<!-- <el-radio-group v-model="allVal[4].val" :disabled="allVal[4].lock">-->
<!-- <el-radio v-for="item in industryCodeTypeList" :label="item.code">-->
<!-- {{ item.name }} - {{ item.code }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="5">-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[5].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[5].meaning }}</div>-->
<!-- </div>-->
<!-- <el-radio-group v-model="allVal[5].val" :disabled="allVal[5].lock">-->
<!-- <el-radio v-for="item in deviceTypeList" :label="item.code">-->
<!-- {{ item.name }} - {{ item.code }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="6">-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[6].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[6].meaning }}</div>-->
<!-- </div>-->
<!-- <el-radio-group v-model="allVal[6].val" :disabled="allVal[6].lock">-->
<!-- <el-radio v-for="item in networkIdentificationTypeList" :label="item.code">-->
<!-- {{ item.name }} - {{ item.code }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane name="7">-->
<!-- 请手动输入设备/用户序号, 六位数字-->
<!-- <div slot="label">-->
<!-- <div class="show-code-item">{{ allVal[7].val }}</div>-->
<!-- <div style="text-align: center">{{ allVal[7].meaning }}</div>-->
<!-- </div>-->
<!-- <el-input-->
<!-- type="text"-->
<!-- placeholder="请输入内容"-->
<!-- v-model="allVal[7].val"-->
<!-- maxlength="6"-->
<!-- :disabled="allVal[7].lock"-->
<!-- show-word-limit-->
<!-- >-->
<!-- </el-input>-->
<!-- </el-tab-pane>-->
</el-tabs>
</el-dialog>
</div> </div>
<el-radio-group v-model="allVal[1].val" :disabled="allVal[1].lock">
<el-radio v-for="item in regionList" :key="item.commonRegionId" :label="item.commonRegionDeviceId.substring(2)" style="line-height: 2rem">
{{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(2) }}
</el-radio>
</el-radio-group>
</el-tab-pane>
<el-tab-pane name="2">
<div slot="label">
<div class="show-code-item">{{ allVal[2].val }}</div>
<div style="text-align: center">{{ allVal[2].meaning }}</div>
</div>
<el-radio-group v-model="allVal[2].val" :disabled="allVal[2].lock">
<el-radio v-for="item in regionList" :key="item.commonRegionId" :label="item.commonRegionDeviceId.substring(4)" style="line-height: 2rem">
{{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(4) }}
</el-radio>
</el-radio-group>
</el-tab-pane>
<el-tab-pane name="3">
请手动输入基层接入单位编码,两位数字
<div slot="label">
<div class="show-code-item">{{ allVal[3].val }}</div>
<div style="text-align: center">{{ allVal[3].meaning }}</div>
</div>
<el-input
type="text"
placeholder="请输入内容"
v-model="allVal[3].val"
maxlength="2"
:disabled="allVal[3].lock"
show-word-limit
>
</el-input>
</el-tab-pane>
<el-tab-pane name="4">
<div slot="label">
<div class="show-code-item">{{ allVal[4].val }}</div>
<div style="text-align: center; ">{{ allVal[4].meaning }}</div>
</div>
<el-radio-group v-model="allVal[4].val" :disabled="allVal[4].lock">
<el-radio v-for="item in industryCodeTypeList" :key="item.code" :label="item.code" style="line-height: 2rem">
{{ item.name }} - {{ item.code }}
</el-radio>
</el-radio-group>
</el-tab-pane>
<el-tab-pane name="5">
<div slot="label">
<div class="show-code-item">{{ allVal[5].val }}</div>
<div style="text-align: center">{{ allVal[5].meaning }}</div>
</div>
<el-radio-group v-model="allVal[5].val" :disabled="allVal[5].lock" >
<el-radio v-for="item in deviceTypeList" :label="item.code" style="line-height: 2rem">
{{ item.name }} - {{ item.code }}
</el-radio>
</el-radio-group>
</el-tab-pane>
<el-tab-pane name="6">
<div slot="label">
<div class="show-code-item">{{ allVal[6].val }}</div>
<div style="text-align: center">{{ allVal[6].meaning }}</div>
</div>
<el-radio-group v-model="allVal[6].val" :disabled="allVal[6].lock">
<el-radio v-for="item in networkIdentificationTypeList" :label="item.code" style="line-height: 2rem">
{{ item.name }} - {{ item.code }}
</el-radio>
</el-radio-group>
</el-tab-pane>
<el-tab-pane name="7">
请手动输入设备/用户序号, 六位数字
<div slot="label">
<div class="show-code-item">{{ allVal[7].val }}</div>
<div style="text-align: center">{{ allVal[7].meaning }}</div>
</div>
<el-input
type="text"
placeholder="请输入内容"
v-model="allVal[7].val"
maxlength="6"
:disabled="allVal[7].lock"
show-word-limit
>
</el-input>
</el-tab-pane>
</el-tabs>
<el-form style="">
<el-form-item style="margin-top: 22px; margin-bottom: 0;">
<div style="float:right;">
<el-button type="primary" @click="handleOk"></el-button>
<el-button @click="closeModel"></el-button>
</div>
</el-form-item>
</el-form>
</el-dialog>
</template> </template>
<script> <script>
export default { export default {
name: "addUser",
props: {}, props: {},
computed: {}, computed: {},
created() {
// this.getRegionList()
},
data() { data() {
return { return {
showVideoDialog: false, showVideoDialog: false,
okText: "完成",
activeKey: '0', activeKey: '0',
allVal: [ allVal: [
{ {
@ -193,12 +191,15 @@ export default {
industryCodeTypeList: [], industryCodeTypeList: [],
networkIdentificationTypeList: [], networkIdentificationTypeList: [],
endCallBck: null, endCallBck: null,
loading: false,
}; };
}, },
methods: { methods: {
openDialog: function (endCallBck, code, lockIndex, lockContent) { openDialog: function (endCallBck, code, lockIndex, lockContent) {
this.showVideoDialog = true this.showVideoDialog = true
this.activeKey= '0';
this.regionList = []
this.getRegionList()
if (typeof code != 'undefined' && code.length === 20) { if (typeof code != 'undefined' && code.length === 20) {
this.allVal[0].val = code.substring(0, 2) this.allVal[0].val = code.substring(0, 2)
this.allVal[1].val = code.substring(2, 4) this.allVal[1].val = code.substring(2, 4)
@ -206,22 +207,23 @@ export default {
this.allVal[3].val = code.substring(6, 8) this.allVal[3].val = code.substring(6, 8)
this.allVal[4].val = code.substring(8, 10) this.allVal[4].val = code.substring(8, 10)
this.allVal[5].val = code.substring(10, 13) this.allVal[5].val = code.substring(10, 13)
this.allVal[6].val = code.substring(14, 15) this.allVal[6].val = code.substring(13, 14)
this.allVal[7].val = code.substring(15) this.allVal[7].val = code.substring(14)
} }
console.log(this.allVal)
if (typeof lockIndex != 'undefined') { if (typeof lockIndex != 'undefined') {
this.allVal[lockIndex].lock = true this.allVal[lockIndex].lock = true
this.allVal[lockIndex].val = lockContent this.allVal[lockIndex].val = lockContent
} }
this.endCallBck = endCallBck; this.endCallBck = endCallBck;
}, },
getRegionList: () => { getRegionList: function() {
this.regionList = []
if (this.activeKey === '0' || this.activeKey === '1' || this.activeKey === '2') { if (this.activeKey === '0' || this.activeKey === '1' || this.activeKey === '2') {
let parent = '' let parent = ''
if (this.activeKey === '1') { if (this.activeKey === '1') {
parent = this.allVal[0].val parent = this.allVal[0].val
if (parent === '11' || parent === '12' || parent === '31') { if (parent === '11' || parent === '12' || parent === '31') {
this.regionList = []
this.regionList.push({ this.regionList.push({
// ID // ID
commonRegionId: -1, commonRegionId: -1,
@ -274,6 +276,7 @@ export default {
} }
this.queryChildList(parent); this.queryChildList(parent);
} else if (this.activeKey === '4') { } else if (this.activeKey === '4') {
console.log(222)
this.queryIndustryCodeList(); this.queryIndustryCodeList();
} else if (this.activeKey === '5') { } else if (this.activeKey === '5') {
this.queryDeviceTypeList(); this.queryDeviceTypeList();
@ -281,7 +284,8 @@ export default {
this.queryNetworkIdentificationTypeList(); this.queryNetworkIdentificationTypeList();
} }
}, },
queryChildList: (parent)=>{ queryChildList: function(parent){
this.regionList = []
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: "/api/region/base/child/list", url: "/api/region/base/child/list",
@ -298,13 +302,14 @@ export default {
this.$message.error(error); this.$message.error(error);
}); });
}, },
queryIndustryCodeList: ()=>{ queryIndustryCodeList: function(){
this.industryCodeTypeList = []
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: "/api/common/channel/industry/list", url: "/api/common/channel/industry/list",
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.industryCodeTypeList.value = res.data.data this.industryCodeTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -312,13 +317,14 @@ export default {
this.$message.error(error); this.$message.error(error);
}); });
}, },
queryDeviceTypeList: ()=>{ queryDeviceTypeList: function(){
this.deviceTypeList = []
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: "/api/common/channel/type/list", url: "/api/common/channel/type/list",
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.deviceTypeList.value = res.data.data this.deviceTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -326,13 +332,14 @@ export default {
this.$message.error(error); this.$message.error(error);
}); });
}, },
queryNetworkIdentificationTypeList: ()=>{ queryNetworkIdentificationTypeList: function(){
this.networkIdentificationTypeList = []
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: "/api/common/channel/network/identification/list", url: "/api/common/channel/network/identification/list",
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.networkIdentificationTypeList.value = res.data.data this.networkIdentificationTypeList = res.data.data
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -343,7 +350,7 @@ export default {
closeModel: function (){ closeModel: function (){
this.showVideoDialog = false this.showVideoDialog = false
}, },
handleOk: () => { handleOk: function() {
const code = const code =
this.allVal[0].val + this.allVal[0].val +
this.allVal[1].val + this.allVal[1].val +