出厂试验

main
mhsnet 7 months ago
parent bcd730313c
commit ddf91eb09d

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow"> <vxe-modal class-name="csty-app-ip-grade-form" v-model="refShow" width="1300" height="770" show-zoom show-footer
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,39 +107,48 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="防护等级" <vxe-form-item title="防护等级" field="Protection" span="12">
field="Protection" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.Protection" placeholder="请输入防护等级" clearable <vxe-input v-model="params.data.Protection" placeholder="请输入防护等级" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="AppIPGradeForm"> <script lang="ts" setup name="AppIPGradeForm">
@ -139,45 +159,46 @@ import { map as _map } from 'lodash'
import * as AppIPGradeApi from '@/api/gw/appIPGrade' import * as AppIPGradeApi from '@/api/gw/appIPGrade'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000090", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000090",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"Protection": undefined, Ecode: "NotImp",
"Sended": 0 SgEntityId: "NotImp",
}) DataUniqueIdentifier: "NotImp",
// Protection: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -203,15 +224,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增绝缘电阻的验证' modalTitle.value = '新增绝缘电阻的验证'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑绝缘电阻的验证' modalTitle.value = '编辑绝缘电阻的验证'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -226,7 +246,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制绝缘电阻的验证' modalTitle.value = '复制绝缘电阻的验证'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -240,6 +259,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -280,7 +301,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -312,32 +335,16 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Protection": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow"> <vxe-modal class-name="csty-app-quality-inspection-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,23 +107,33 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="箱体内外表面应平整光洁、美观、无锈蚀、无磕碰损伤" field="TextDescription1" span="12"> <vxe-form-item title="箱体内外表面应平整光洁、美观、无锈蚀、无磕碰损伤" field="TextDescription1" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription1" clearable> <vxe-select v-model="params.data.TextDescription1" clearable>
@ -137,15 +158,15 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="AppQualityInspectionForm"> <script lang="ts" setup name="AppQualityInspectionForm">
@ -156,47 +177,48 @@ import { map as _map, unset as _unset } from 'lodash'
import * as AppQualityInspectionApi from '@/api/gw/appQualityInspection' import * as AppQualityInspectionApi from '@/api/gw/appQualityInspection'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000094", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000094",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"TextDescription1": undefined, Ecode: "NotImp",
"TextDescription2": undefined, SgEntityId: "NotImp",
"TextDescription3": undefined, DataUniqueIdentifier: "NotImp",
"Sended": 0 TextDescription1: undefined,
}) TextDescription2: undefined,
// TextDescription3: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -222,15 +244,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增外观质量检查' modalTitle.value = '新增外观质量检查'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑外观质量检查' modalTitle.value = '编辑外观质量检查'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -245,7 +266,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制外观质量检查' modalTitle.value = '复制外观质量检查'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -259,6 +279,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -299,7 +321,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -331,34 +355,17 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000094",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"TextDescription3": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow"> <vxe-modal class-name="csty-insulation-resistance-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,46 +107,54 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="相间(MΩ)" <vxe-form-item title="相间(MΩ)" field="Resistance" span="12">
field="Resistance" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.Resistance" placeholder="请输入相间" clearable <vxe-input v-model="params.data.Resistance" placeholder="请输入相间" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="相导体与裸露导电部件之间(MΩ)" <vxe-form-item title="相导体与裸露导电部件之间(MΩ)" field="InResistance" span="12">
field="InResistance" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.InResistance" placeholder="请输入相导体与裸露导电部件之间" clearable <vxe-input v-model="params.data.InResistance" placeholder="请输入相导体与裸露导电部件之间" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="InsulationResistanceForm"> <script lang="ts" setup name="InsulationResistanceForm">
@ -146,45 +165,46 @@ import { map as _map } from 'lodash'
import * as InsulationResistanceApi from '@/api/gw/insulationResistance' import * as InsulationResistanceApi from '@/api/gw/insulationResistance'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000090", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000090",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"Resistance": undefined, Ecode: "NotImp",
"InResistance": undefined, SgEntityId: "NotImp",
"Sended": 0 DataUniqueIdentifier: "NotImp",
}) Resistance: undefined,
InResistance: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// //
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
@ -211,15 +231,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增绝缘电阻的验证' modalTitle.value = '新增绝缘电阻的验证'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑绝缘电阻的验证' modalTitle.value = '编辑绝缘电阻的验证'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -234,7 +253,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制绝缘电阻的验证' modalTitle.value = '复制绝缘电阻的验证'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -248,6 +266,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -288,7 +308,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -320,33 +342,16 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Resistance": undefined,
"InResistance": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow"> <vxe-modal class-name="csty-machine-operation-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(对安装在装置内的开关电器及所有手动操作部件如主开关操作手柄均操作5次其机构动作应可靠正常联锁机构符合要求)" field="TextDescription" span="12"> <vxe-form-item title="是否满足要求(对安装在装置内的开关电器及所有手动操作部件如主开关操作手柄均操作5次其机构动作应可靠正常联锁机构符合要求)"
field="TextDescription" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable> <vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="MachineOperationForm"> <script lang="ts" setup name="MachineOperationForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as MachineOperationApi from '@/api/gw/machineOperation' import * as MachineOperationApi from '@/api/gw/machineOperation'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000086", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000086",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"TextDescription": undefined, Ecode: "NotImp",
"Sended": 0 SgEntityId: "NotImp",
}) DataUniqueIdentifier: "NotImp",
// TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增机械操作' modalTitle.value = '新增机械操作'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑机械操作' modalTitle.value = '编辑机械操作'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制机械操作' modalTitle.value = '复制机械操作'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -281,7 +302,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -313,32 +336,16 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000086",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-protection-circuit-form" v-if="refShow"> <vxe-modal class-name="csty-phase-loss-protection-testing-form" v-model="refShow" width="1200" height="770"
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-zoom show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(将装置电容器全部投入工作运行,将主电路任意一相断开,装置应能全部或至少缺相回路电容器切徐)" field="TextDescription" span="12"> <vxe-form-item title="是否满足要求(将装置电容器全部投入工作运行,将主电路任意一相断开,装置应能全部或至少缺相回路电容器切徐)"
field="TextDescription" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable> <vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="PhaseLossProtectionTestingForm"> <script lang="ts" setup name="PhaseLossProtectionTestingForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as PhaseLossProtectionTestingApi from '@/api/gw/phaseLossProtectionTesting' import * as PhaseLossProtectionTestingApi from '@/api/gw/phaseLossProtectionTesting'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000091", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000091",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"TextDescription": undefined, Ecode: "NotImp",
"Sended": 0 SgEntityId: "NotImp",
}) DataUniqueIdentifier: "NotImp",
// TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增缺相保护试验' modalTitle.value = '新增缺相保护试验'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑缺相保护试验' modalTitle.value = '编辑缺相保护试验'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制缺相保护试验' modalTitle.value = '复制缺相保护试验'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -241,6 +262,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -281,7 +304,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -313,32 +338,16 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000091",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-power-operation-testing-form" v-if="refShow"> <vxe-modal class-name="csty-power-operation-testing-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(85%~110%额定电压范围操作5次电器元件的动作显示均应符合相应要求且各操作器件动作灵活)" field="TextDescription" span="12"> <vxe-form-item title="是否满足要求(85%~110%额定电压范围操作5次电器元件的动作显示均应符合相应要求且各操作器件动作灵活)"
field="TextDescription" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable> <vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="PowerOperationTestingForm"> <script lang="ts" setup name="PowerOperationTestingForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as PowerOperationTestingApi from '@/api/gw/powerOperationTesting' import * as PowerOperationTestingApi from '@/api/gw/powerOperationTesting'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000088", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000088",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"TextDescription": undefined, Ecode: "NotImp",
"Sended": 0 SgEntityId: "NotImp",
}) DataUniqueIdentifier: "NotImp",
// TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -204,7 +227,7 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -241,6 +264,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -281,7 +306,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -313,32 +340,16 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000088",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-protection-circuit-form" v-if="refShow"> <vxe-modal class-name="csty-voltage-protection-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
@change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(将电容器拆除给装置接上电源并将电容器投切开关闭合调整电源电压1.1~1.2倍的额定电压时应在1min内将电容器切除)" field="TextDescription" span="12"> <vxe-form-item title="是否满足要求(将电容器拆除给装置接上电源并将电容器投切开关闭合调整电源电压1.1~1.2倍的额定电压时应在1min内将电容器切除)"
field="TextDescription" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable> <vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="VoltageProtectionForm"> <script lang="ts" setup name="VoltageProtectionForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as VoltageProtectionApi from '@/api/gw/voltageProtection' import * as VoltageProtectionApi from '@/api/gw/voltageProtection'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000089", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000089",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"TextDescription": undefined, Ecode: "NotImp",
"Sended": 0 SgEntityId: "NotImp",
}) DataUniqueIdentifier: "NotImp",
// TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增工频过电压保护试验' modalTitle.value = '新增工频过电压保护试验'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑工频过电压保护试验' modalTitle.value = '编辑工频过电压保护试验'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制工频过电压保护试验' modalTitle.value = '复制工频过电压保护试验'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -241,6 +262,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -281,7 +304,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -313,32 +338,17 @@ const fnSubmitA = async () => {
} }
refShow.value = false refShow.value = false
emit('success') emit('success')
}
})
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000089",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>
Loading…
Cancel
Save