Commit e53934e8 authored by 李苏's avatar 李苏 💬

调整

parent b4535679
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-06-20 14:05:57
* @FilePath: /zghywpc-vue/src/views/fmegl/fmesjhpcecfx/edit.vue
-->
<template>
<!-- prop 穿透赋值 -->
<BaseEdit v-bind="$attrs" :config='editConfig'>
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.editPage)" size='mini' type="primary">示例按钮</el-button> -->
<!-- <AuxButton :dynamic='true' :queryParams="{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</template>
</BaseEdit>
</template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
v-if="item.show!==false"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
computed:{
utype(){
return this.form.type
}
},
watch:{
utype(val){
if(val=='QT'){
this.editColItemList[4].show=true
}else{
this.editColItemList[4].show=false
}
}
},
data() {
return {
editConfig: {
/* 生成form表单 */
editColItemList: [
editColItemList: [
{
"label": "责任专业",
"prop": "zrzy",
"span": 12,
"type": "input"
},
{
"label": "时间",
"prop": "ywrq",
"span": 12,
"type": "date"
},
{
"label": "偏差描述",
"prop": "pcms",
"span": 12,
"type": "input"
},
{
"label": "类别",
"prop": "type",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/type",
"match": {
"value": "id",
"label": "name"
}
{
"label": "责任专业",
"prop": "zrzy",
"span": 12,
"type": "input"
},
{
"label": "时间",
"prop": "ywrq",
"span": 12,
"type": "date"
},
{
"label": "偏差描述",
"prop": "pcms",
"span": 12,
"type": "input"
},
{
"label": "类别",
"prop": "type",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/type",
"match": {
"value": "id",
"label": "name"
}
},
{
"label": "是否整改",
"prop": "sfzg",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/yesorno",
"match": {
"value": "id",
"label": "name"
}
}
},
{
"label": "类别(其他)",
"prop": "typeName",
"span": 12,
"type": "input",
show:false
},
{
"label": "是否整改",
"prop": "sfzg",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/yesorno",
"match": {
"value": "id",
"label": "name"
}
},
{
"label": "原因分析",
"prop": "yyfx",
"span": 12,
"type": "input"
},
{
"label": "区域",
"prop": "region",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/Region",
"match": {
"value": "id",
"label": "name"
}
}
},
{
"label": "原因分析",
"prop": "yyfx",
"span": 12,
"type": "input"
},
{
"label": "区域",
"prop": "region",
"span": 12,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "fme/ufmesjpc/init/Region",
"match": {
"value": "id",
"label": "name"
}
},
{
"label": "通知单号",
"prop": "tzdh",
"span": 12,
"type": "input"
},
{
"label": "期间",
"prop": "qj",
"span": 12,
"type": "input"
},
{
"label": "备注",
"prop": "bz",
"span": 24,
"type": "input"
}
]
,
/* 生成主从表,为空数组默认不展示 */
editTableTitle: [
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable: ''
}
},
{
"label": "通知单号",
"prop": "tzdh",
"span": 12,
"type": "input"
},
{
"label": "期间",
"prop": "qj",
"span": 12,
"type": "input"
},
{
"label": "备注",
"prop": "bz",
"span": 24,
"type": "input"
}
]
}
},
methods: {
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</script>
<style>
</style>
......@@ -55,6 +55,11 @@
"value": "id"
}
},
{
"title": "类别(其他)",
"field": "typeName",
"width": 200
},
{
"title": "是否整改",
"field": "sfzg",
......
......@@ -63,7 +63,17 @@
showList: [],
baseurl: baseurl,
Gtoken: Gtoken,
editColItemList: [{
editColItemList: [
{
"label": "其他责任单位",
"prop": "isqtgnwz",
// required: true,
"span": 12,
"type": "checkbox",
"value": "N",
},
{
"label": "功能位置",
"prop": "gnwz",
"span": 12,
......@@ -84,6 +94,14 @@
},
required: true,
},
{
"label": "功能位置(其他)",
"prop": "gnwzname",
show:false,
"span": 12,
"type": "input",
"value": "",
},
{
"label": "年度",
"prop": "year",
......@@ -454,11 +472,24 @@
}
},
computed:{
isqtgnwz(){
return this.form.isqtgnwz
},
isqtzrdw(){
return this.form.isqtzrdw
}
},
watch:{
isqtgnwz(val){
if(val!=='N'){
this.editColItemList[1].show=false
this.editColItemList[2].show=true
}else{
this.editColItemList[1].show=true
this.editColItemList[2].show=false
}
},
isqtzrdw(val){
if(val!=='N'){
this.editColItemList[12].show=false
......
......@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-07-24 17:59:52
* @LastEditTime: 2025-07-31 16:38:40
* @FilePath: /zghywpc-vue/src/views/jyfkgl/ywsjlr/index.vue
-->
<template>
......@@ -41,7 +41,7 @@
label: "责任单位",
prop: "zrdw",
formatter(a,b,v){
console.log(a,b,v)
return v||a.zrdwname
},
width: 100
......@@ -50,7 +50,10 @@
{
label: "功能位置",
prop: "gnwz",
fieldType: "ftString",
formatter(a,b,v){
return v||a.gnwzname
},
width: 180
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment