Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -441,7 +441,7 @@
|
|||||||
|
|
||||||
.dialog-small {
|
.dialog-small {
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
max-height: 260px;
|
max-height: 320px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,3 +490,21 @@
|
|||||||
// color: var(--ba-bg-color-overlay) !important;
|
// color: var(--ba-bg-color-overlay) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-message-box{
|
||||||
|
padding: 0px !important;
|
||||||
|
.el-message-box__header{
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
.el-message-box__title{
|
||||||
|
color: #fff;
|
||||||
|
padding: 10px 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.el-message-box__content{
|
||||||
|
padding: 10px ;
|
||||||
|
border-bottom: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
.el-message-box__btns {
|
||||||
|
|
||||||
|
padding: 10px;}
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<el-form-item label="编码" prop="code" :label-width="100">
|
<el-form-item label="编码" prop="code" :label-width="100">
|
||||||
<el-input v-model="formContent.code" />
|
<el-input v-model="formContent.code" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图标" prop="icon" :label-width="100">
|
<el-form-item v-if="!formContent.type" label="图标" prop="icon" :label-width="100">
|
||||||
<IconSelect
|
<IconSelect
|
||||||
v-model="formContent.icon"
|
v-model="formContent.icon"
|
||||||
:iconValue="formContent.icon"
|
:iconValue="formContent.icon"
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
placeholder="选择一个图标"
|
placeholder="选择一个图标"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="路由地址" prop="path" :label-width="100">
|
<el-form-item v-if="!formContent.type" label="路由地址" prop="path" :label-width="100">
|
||||||
<el-input v-model="formContent.path" />
|
<el-input v-model="formContent.path" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="组件地址" prop="component" :label-width="100">
|
<el-form-item v-if="!formContent.type" label="组件地址" prop="component" :label-width="100">
|
||||||
<el-input v-model="formContent.component" />
|
<el-input v-model="formContent.component" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort" :label-width="100">
|
<el-form-item label="排序" prop="sort" :label-width="100">
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ emit('update:testStatus',ts.value)
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.right-content{
|
.right-content{
|
||||||
max-height: 400px;
|
/* max-height: 400px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tabs-label .el-icon {
|
.custom-tabs-label .el-icon {
|
||||||
@@ -356,4 +356,10 @@ emit('update:testStatus',ts.value)
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
.dialog-content{
|
||||||
|
height: 472px;
|
||||||
|
}
|
||||||
|
.el-tabs--border-card {
|
||||||
|
height: 435px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,22 +3,17 @@
|
|||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="预检测项目">
|
<el-tab-pane label="预检测项目">
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-checkbox
|
<el-checkbox v-for="(item, index) in detectionOptions" v-model="item.selected" :key="index"
|
||||||
v-for="(item, index) in detectionOptions"
|
:label="item.name"></el-checkbox>
|
||||||
v-model="item.selected"
|
|
||||||
:key="index"
|
|
||||||
:label="item.name"
|
|
||||||
|
|
||||||
></el-checkbox
|
|
||||||
>
|
|
||||||
<!-- disabled="true" -->
|
<!-- disabled="true" -->
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<div class = "test-dialog">
|
<div class="test-dialog">
|
||||||
<div class="dialog-left">
|
<div class="dialog-left">
|
||||||
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus" finish-status="success">
|
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus"
|
||||||
|
finish-status="success">
|
||||||
<el-step title="源通讯校验" />
|
<el-step title="源通讯校验" />
|
||||||
<el-step title="设备通讯校验" />
|
<el-step title="设备通讯校验" />
|
||||||
<el-step title="协议校验" />
|
<el-step title="协议校验" />
|
||||||
@@ -29,36 +24,40 @@
|
|||||||
<div class="dialog-right">
|
<div class="dialog-right">
|
||||||
<el-collapse v-model="collapseActiveName" accordion>
|
<el-collapse v-model="collapseActiveName" accordion>
|
||||||
<el-collapse-item title="源通讯校验" name="1">
|
<el-collapse-item title="源通讯校验" name="1">
|
||||||
<div class = "div-log">
|
<div class="div-log">
|
||||||
<p v-for="(item, index) in step1InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<p v-for="(item, index) in step1InitLog" :key="index"
|
||||||
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
{{ item.log }} <br />
|
{{ item.log }} <br />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="设备通讯校验" name="2">
|
<el-collapse-item title="设备通讯校验" name="2">
|
||||||
<div class = "div-log">
|
<div class="div-log">
|
||||||
<p v-for="(item, index) in step2InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<p v-for="(item, index) in step2InitLog" :key="index"
|
||||||
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
{{ item.log }} <br />
|
{{ item.log }} <br />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="协议校验" name="3">
|
<el-collapse-item title="协议校验" name="3">
|
||||||
<div class = "div-log">
|
<div class="div-log">
|
||||||
<p v-for="(item, index) in step3InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<p v-for="(item, index) in step3InitLog" :key="index"
|
||||||
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
{{ item.log }} <br />
|
{{ item.log }} <br />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="相序校验" name="4">
|
<el-collapse-item title="相序校验" name="4">
|
||||||
<div class = "div-log">
|
<div class="div-log">
|
||||||
<p v-for="(item, index) in step4InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<p v-for="(item, index) in step4InitLog" :key="index"
|
||||||
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
{{ item.log }} <br />
|
{{ item.log }} <br />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -66,66 +65,66 @@
|
|||||||
const step1InitLog = ref([
|
const step1InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step1Log = ref([
|
const step1Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'源通讯校验成功',
|
log: '源通讯校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step2InitLog = ref([
|
const step2InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step2Log = ref([
|
const step2Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001通讯校验成功',
|
log: '被检设备:240001通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002通讯校验成功',
|
log: '被检设备:240002通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003通讯校验成功',
|
log: '被检设备:240003通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004通讯校验成功',
|
log: '被检设备:240004通讯校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step3InitLog = ref([
|
const step3InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step3Log = ref([
|
const step3Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001协议校验成功',
|
log: '被检设备:240001协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002协议校验成功',
|
log: '被检设备:240002协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003协议校验成功',
|
log: '被检设备:240003协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004协议校验成功',
|
log: '被检设备:240004协议校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -133,26 +132,26 @@ const step3Log = ref([
|
|||||||
const step4InitLog = ref([
|
const step4InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step4Log = ref([
|
const step4Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001相序校验成功',
|
log: '被检设备:240001相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002相序校验成功',
|
log: '被检设备:240002相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003相序校验成功',
|
log: '被检设备:240003相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004相序校验成功',
|
log: '被检设备:240004相序校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -181,16 +180,16 @@ const detectionOptions = ref([
|
|||||||
name: "相序校验",//判断装置的接线是否正确
|
name: "相序校验",//判断装置的接线是否正确
|
||||||
selected: true,
|
selected: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// id: 4,
|
// id: 4,
|
||||||
// name: "守时校验",//判断装置24小时内的守时误差是否小于1s
|
// name: "守时校验",//判断装置24小时内的守时误差是否小于1s
|
||||||
// selected: true,
|
// selected: true,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// id: 5,
|
// id: 5,
|
||||||
// name: "通道系数校准",//通过私有协议与装置进行通讯,校准三相电压电流的通道系数
|
// name: "通道系数校准",//通过私有协议与装置进行通讯,校准三相电压电流的通道系数
|
||||||
// selected: true,
|
// selected: true,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// id: 6,
|
// id: 6,
|
||||||
// name: "实时数据比对",
|
// name: "实时数据比对",
|
||||||
@@ -203,7 +202,7 @@ const detectionOptions = ref([
|
|||||||
|
|
||||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
testStatus: {
|
testStatus: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'wait'
|
default: 'wait'
|
||||||
@@ -214,28 +213,24 @@ const ts = ref('');
|
|||||||
|
|
||||||
watch(activeIndex, function (newValue, oldValue) {
|
watch(activeIndex, function (newValue, oldValue) {
|
||||||
|
|
||||||
if(activeIndex.value === 1)
|
if (activeIndex.value === 1) {
|
||||||
{
|
|
||||||
step1InitLog.value.length = 0;
|
step1InitLog.value.length = 0;
|
||||||
step1InitLog.value = step1Log.value;
|
step1InitLog.value = step1Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 2)
|
if (activeIndex.value === 2) {
|
||||||
{
|
|
||||||
step2InitLog.value.length = 0;
|
step2InitLog.value.length = 0;
|
||||||
step2InitLog.value = step2Log.value;
|
step2InitLog.value = step2Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 3)
|
if (activeIndex.value === 3) {
|
||||||
{
|
|
||||||
step3InitLog.value.length = 0;
|
step3InitLog.value.length = 0;
|
||||||
step3InitLog.value = step3Log.value;
|
step3InitLog.value = step3Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value > 3)
|
if (activeIndex.value > 3) {
|
||||||
{
|
|
||||||
step4InitLog.value.length = 0;
|
step4InitLog.value.length = 0;
|
||||||
step4InitLog.value = step4Log.value;
|
step4InitLog.value = step4Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value < activeTotalNum.value - 2)
|
if (activeIndex.value < activeTotalNum.value - 2)
|
||||||
collapseActiveName.value = (newValue+1).toString()
|
collapseActiveName.value = (newValue + 1).toString()
|
||||||
else
|
else
|
||||||
collapseActiveName.value = (activeTotalNum.value - 1).toString()
|
collapseActiveName.value = (activeTotalNum.value - 1).toString()
|
||||||
})
|
})
|
||||||
@@ -243,20 +238,17 @@ watch(activeIndex, function (newValue, oldValue) {
|
|||||||
//监听goods_sn的变化
|
//监听goods_sn的变化
|
||||||
watch(testStatus, function (newValue, oldValue) {
|
watch(testStatus, function (newValue, oldValue) {
|
||||||
ts.value = props.testStatus;
|
ts.value = props.testStatus;
|
||||||
if(ts.value==='start')
|
if (ts.value === 'start') {
|
||||||
{
|
|
||||||
ts.value = 'process'
|
ts.value = 'process'
|
||||||
|
|
||||||
let timer = setInterval(() => {
|
let timer = setInterval(() => {
|
||||||
if(activeIndex.value < activeTotalNum.value - 2)
|
if (activeIndex.value < activeTotalNum.value - 2)
|
||||||
activeIndex.value++
|
activeIndex.value++
|
||||||
else if(activeIndex.value === activeTotalNum.value -2)
|
else if (activeIndex.value === activeTotalNum.value - 2) {
|
||||||
{
|
|
||||||
activeIndex.value++
|
activeIndex.value++
|
||||||
activeIndex.value++
|
activeIndex.value++
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
ts.value = 'success'
|
ts.value = 'success'
|
||||||
}
|
}
|
||||||
@@ -269,52 +261,61 @@ const emit = defineEmits(['update:testStatus']);
|
|||||||
//监听sn
|
//监听sn
|
||||||
watch(ts, function (newValue, oldValue) {
|
watch(ts, function (newValue, oldValue) {
|
||||||
//修改父组件
|
//修改父组件
|
||||||
emit('update:testStatus',ts.value)
|
emit('update:testStatus', ts.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.test-dialog {
|
||||||
.test-dialog{
|
|
||||||
height: 350px;
|
height: 350px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: row; /* 横向排列 */
|
flex-direction: row;
|
||||||
|
/* 横向排列 */
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
/* .dialog-left{
|
/* .dialog-left{
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
.dialog-left{
|
|
||||||
|
.dialog-left {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .dialog-left :deep(.test-head-steps){
|
/* .dialog-left :deep(.test-head-steps){
|
||||||
height: 80px;
|
height: 80px;
|
||||||
/* margin-bottom: 10px;
|
/* margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* .dialog-left :deep(.el-step__title) {
|
/* .dialog-left :deep(.el-step__title) {
|
||||||
font-size: 18px !important; /* 设置标题字体大小
|
font-size: 18px !important; /* 设置标题字体大小
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* .dialog-left :deep(.el-step__icon-inner) {
|
/* .dialog-left :deep(.el-step__icon-inner) {
|
||||||
font-size: 24px !important;
|
font-size: 24px !important;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.dialog-right{
|
.dialog-right {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.dialog-right :deep(.el-collapse-item__header) {
|
|
||||||
|
.dialog-right :deep(.el-collapse-item__header) {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-log {
|
||||||
|
height: 145px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-left: 10px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div-log{
|
}
|
||||||
height: 100px;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -229,8 +229,9 @@ watch(ts, function (newValue, oldValue) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: row; /* 横向排列 */
|
flex-direction: row; /* 横向排列 */
|
||||||
margin-top: 20px;
|
/* margin-top: 20px; */
|
||||||
min-height: 300px;
|
/* min-height: 300px; */
|
||||||
|
height: 472px;
|
||||||
/* .dialog-left{
|
/* .dialog-left{
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
} */
|
} */
|
||||||
|
|||||||
@@ -353,9 +353,9 @@ const resizeObserver = new ResizeObserver(entries => {
|
|||||||
chartsWidth.value = entry.contentRect.width;
|
chartsWidth.value = entry.contentRect.width;
|
||||||
console.log('Charts Info Width:', chartsWidth.value);
|
console.log('Charts Info Width:', chartsWidth.value);
|
||||||
|
|
||||||
pieRef1.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef1.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
pieRef2.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef2.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
pieRef3.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef3.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -631,4 +631,12 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
:deep(.el-collapse-item__conten){
|
||||||
|
// background-color:#f6f6f6;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
:deep(.el-collapse-item__content ){
|
||||||
|
// background-color:#f6f6f6;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -148,18 +148,19 @@
|
|||||||
<el-row :gutter="24" >
|
<el-row :gutter="24" >
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label='是否加密' prop='encryptionFlag' :label-width="100">
|
<el-form-item label='是否加密' prop='encryptionFlag' :label-width="100">
|
||||||
<el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密" @change="handleEncryptionChange">
|
<!-- <el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密" @change="handleEncryptionChange">-->
|
||||||
|
<el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密">
|
||||||
<el-option label="是" :value="1"></el-option>
|
<el-option label="是" :value="1"></el-option>
|
||||||
<el-option label="否" :value="0"></el-option>
|
<el-option label="否" :value="0"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" v-if="IsPasswordShow">
|
<el-col :span="8" v-if="formContent.encryptionFlag">
|
||||||
<el-form-item label='识别码' prop='series' clearable :label-width="100">
|
<el-form-item label='识别码' prop='series' clearable :label-width="100">
|
||||||
<el-input v-model='formContent.series' placeholder="请输入识别码" show-password/>
|
<el-input v-model='formContent.series' placeholder="请输入识别码" show-password/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" v-if="IsPasswordShow">
|
<el-col :span="8" v-if="formContent.encryptionFlag">
|
||||||
<el-form-item label='密钥' prop='devKey' clearable :label-width="100">
|
<el-form-item label='密钥' prop='devKey' clearable :label-width="100">
|
||||||
<el-input v-model='formContent.devKey' placeholder="请输入密钥" show-password/>
|
<el-input v-model='formContent.devKey' placeholder="请输入密钥" show-password/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -230,7 +231,7 @@ import MonitorTable from '@/views/machine/device/components/monitorTab.vue';
|
|||||||
|
|
||||||
const MonIsShow = ref(false)
|
const MonIsShow = ref(false)
|
||||||
const DevIsShow = ref(false)
|
const DevIsShow = ref(false)
|
||||||
const IsPasswordShow = ref(false)
|
// const IsPasswordShow = ref(false)
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
const mode = ref()
|
const mode = ref()
|
||||||
// 定义弹出组件元信息
|
// 定义弹出组件元信息
|
||||||
@@ -258,7 +259,7 @@ const disabledDate = (time: Date) => {
|
|||||||
protocol: 'MMS',
|
protocol: 'MMS',
|
||||||
ip: '192.168.1.200',
|
ip: '192.168.1.200',
|
||||||
port: 102,
|
port: 102,
|
||||||
encryptionFlag: 1,
|
encryptionFlag: 0,
|
||||||
reCheckNum:0,
|
reCheckNum:0,
|
||||||
state: 1,
|
state: 1,
|
||||||
})
|
})
|
||||||
@@ -284,7 +285,7 @@ const disabledDate = (time: Date) => {
|
|||||||
protocol: 'MMS',
|
protocol: 'MMS',
|
||||||
ip: '192.168.1.200',
|
ip: '192.168.1.200',
|
||||||
port: 102,
|
port: 102,
|
||||||
encryptionFlag: 1,
|
encryptionFlag: 0,
|
||||||
reCheckNum:0,
|
reCheckNum:0,
|
||||||
state: 1,
|
state: 1,
|
||||||
}
|
}
|
||||||
@@ -344,12 +345,10 @@ const disabledDate = (time: Date) => {
|
|||||||
try {
|
try {
|
||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
|
||||||
if (formContent.value.encryptionFlag === 1) {
|
if (formContent.value.encryptionFlag === 0) {
|
||||||
handleEncryptionChange(1)
|
formContent.value.series = ''
|
||||||
} else {
|
formContent.value.devKey = ''
|
||||||
handleEncryptionChange(0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD');
|
formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD');
|
||||||
if (formContent.value.arrivedDate)
|
if (formContent.value.arrivedDate)
|
||||||
@@ -401,34 +400,34 @@ const open = (sign: string, data: Device.ResPqDev,currentMode: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data.encryptionFlag === 1) {
|
if (data.encryptionFlag === 1) {
|
||||||
handleEncryptionChange(1)
|
//handleEncryptionChange(1)
|
||||||
} else {
|
} else {
|
||||||
handleEncryptionChange(0)
|
//handleEncryptionChange(0)
|
||||||
}
|
}
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
formContent.value = { ...data }
|
formContent.value = { ...data }
|
||||||
} else {
|
} else {
|
||||||
resetFormContent()
|
resetFormContent()
|
||||||
handleEncryptionChange(1)
|
//handleEncryptionChange(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置表单
|
// 重置表单
|
||||||
dialogFormRef.value?.resetFields()
|
dialogFormRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
const handleEncryptionChange = (value: number) => {
|
// const handleEncryptionChange = (value: number) => {
|
||||||
// 根据是否加密来显示或隐藏识别码和密钥
|
// // 根据是否加密来显示或隐藏识别码和密钥
|
||||||
if(value === 1){
|
// if(value === 1){
|
||||||
IsPasswordShow.value = true
|
// IsPasswordShow.value = true
|
||||||
|
//
|
||||||
}else
|
// }else
|
||||||
{
|
// {
|
||||||
IsPasswordShow.value = false
|
// IsPasswordShow.value = false
|
||||||
// formContent.value.series = ''
|
// // formContent.value.series = ''
|
||||||
// formContent.value.devKey = ''
|
// // formContent.value.devKey = ''
|
||||||
// rules.value.series = [];
|
// // rules.value.series = [];
|
||||||
// rules.value.devKey = [];
|
// // rules.value.devKey = [];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 对外映射
|
// 对外映射
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|||||||
@@ -69,19 +69,19 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '设备名称',
|
label: '设备名称',
|
||||||
search: { el: 'input' },
|
search: { el: 'input' },
|
||||||
minWidth: 180,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'devType',
|
prop: 'devType',
|
||||||
label: '设备类型',
|
label: '设备类型',
|
||||||
minWidth: 180,
|
minWidth: 200,
|
||||||
enum: dictStore.getDictData('Dev_Type'),
|
enum: dictStore.getDictData('Dev_Type'),
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createDate',
|
prop: 'createDate',
|
||||||
label: '生产日期',
|
label: '生产日期',
|
||||||
minWidth: 180,
|
minWidth: 200,
|
||||||
search: {
|
search: {
|
||||||
span: 2,
|
span: 2,
|
||||||
render: () => {
|
render: () => {
|
||||||
@@ -120,7 +120,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
minWidth: 190,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<div >
|
<div >
|
||||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
|
<!-- <el-col :span="8">-->
|
||||||
|
<!-- <el-form-item label="检测源名称" prop="name" >-->
|
||||||
|
<!-- <el-input v-model='formContent.name' placeholder="检测源类型+设备类型+数字"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="检测源名称" prop="name" >
|
<el-form-item label="设备类型" prop="devType" >
|
||||||
<el-input v-model='formContent.name' placeholder="源类型+源型号+数字"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="源型号" prop="devType" >
|
|
||||||
<el-select v-model='formContent.devType' placeholder="请选择源型号">
|
<el-select v-model='formContent.devType' placeholder="请选择源型号">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData(dictTypeCode)"
|
v-for="item in dictStore.getDictData(dictTypeCode)"
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="源类型" prop="type">
|
<el-form-item label="检测源类型" prop="type">
|
||||||
<el-select v-model='formContent.type' placeholder="请选择源类型">
|
<el-select v-model='formContent.type' placeholder="请选择检测源类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData('Pq_Source_Type')"
|
v-for="item in dictStore.getDictData('Pq_Source_Type')"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'devType',
|
prop: 'devType',
|
||||||
label: '源型号',
|
label: '设备类型',
|
||||||
enum: dictStore.getDictData('S_Dev_Type_'+dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.code),
|
enum: dictStore.getDictData('S_Dev_Type_'+dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.code),
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
search: { el: 'select' },
|
search: { el: 'select' },
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
label: '源类型',
|
label: '检测源类型',
|
||||||
enum: dictStore.getDictData('Pq_Source_Type'),
|
enum: dictStore.getDictData('Pq_Source_Type'),
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
search: { el: 'select' },
|
search: { el: 'select' },
|
||||||
|
|||||||
Reference in New Issue
Block a user