Browse Source

提交配置依旧修改附表数据渲染方式

master
xiaobai 3 years ago
parent
commit
d5c4d70952
  1. 158
      src/views/ysjl/3000/common/index.vue
  2. 35
      src/views/ysjl/3000/dj/common/zdftFb.vue
  3. 9
      src/views/ysjl/3000/dj/yeyin/index.vue
  4. 12
      src/views/ysjl/3000/dj/zdft/index.vue

158
src/views/ysjl/3000/common/index.vue

@ -188,7 +188,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType === 1 || fromType === 5 || fromType === 3" :gutter="20"> <el-row
v-if="fromType === 1 || fromType === 5 || fromType === 3"
:gutter="20"
>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="使用单位名称" prop="shiyongdanwei"> <el-form-item label="使用单位名称" prop="shiyongdanwei">
<el-input <el-input
@ -290,7 +293,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType === 1 ||fromType === 5" :gutter="20"> <el-row v-if="fromType === 1 || fromType === 5" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="注册代码" prop="zhucedaima"> <el-form-item label="注册代码" prop="zhucedaima">
<el-input <el-input
@ -386,14 +389,22 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item v-if="fromType === 5" label="维护保养单位电话" prop="weibaodanweiDianhua"> <el-form-item
v-if="fromType === 5"
label="维护保养单位电话"
prop="weibaodanweiDianhua"
>
<el-input <el-input
v-model="ysjl.weibaodanweiDianhua" v-model="ysjl.weibaodanweiDianhua"
type="text" type="text"
:disabled="edit" :disabled="edit"
/> />
</el-form-item> </el-form-item>
<el-form-item v-else label="维保电话" prop="weibaodanweiDianhua"> <el-form-item
v-else
label="维保电话"
prop="weibaodanweiDianhua"
>
<el-input <el-input
v-model="ysjl.weibaodanweiDianhua" v-model="ysjl.weibaodanweiDianhua"
type="text" type="text"
@ -413,7 +424,10 @@
</el-row> </el-row>
<el-row v-if="fromType !== 5" :gutter="20"> <el-row v-if="fromType !== 5" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="现场检验条件" prop="xianchangjianyantiaojian"> <el-form-item
label="现场检验条件"
prop="xianchangjianyantiaojian"
>
<el-radio-group v-model="ysjl.xianchangjianyantiaojian"> <el-radio-group v-model="ysjl.xianchangjianyantiaojian">
<el-radio label="符合"> <el-radio label="符合">
符合 符合
@ -512,10 +526,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="倾斜角" prop="qingxiejiao"> <el-form-item label="倾斜角" prop="qingxiejiao">
<el-input <el-input v-model="param.qingxiejiao" type="text">
v-model="param.qingxiejiao"
type="text"
>
<span slot="suffix">°</span> <span slot="suffix">°</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -557,7 +568,10 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="主要检验仪器和设备" prop="gongjuxianghao"> <el-form-item label="主要检验仪器和设备" prop="gongjuxianghao">
<el-input v-model="param.gongjuxianghao" style="width: 100px" />号检验专用工具箱 <el-input
v-model="param.gongjuxianghao"
style="width: 100px"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -582,7 +596,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="18" style="height: auto;"> <el-col :span="18" style="height: auto">
<el-form-item label="备注" prop="beizhu"> <el-form-item label="备注" prop="beizhu">
<el-input <el-input
v-model="ysjl.beizhu" v-model="ysjl.beizhu"
@ -656,17 +670,34 @@
<Inspection :bgfy-data="bgfyData" /> <Inspection :bgfy-data="bgfyData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="fromType === 5" label="附表1" name="three"> <el-tab-pane v-if="fromType === 5" label="附表1" name="three">
<zdft-fb ref="table1" :table-data.sync="fubiao1" /> <zdft-fb ref="table1" :table-data.sync="fubiao1" :state.sync="state" />
</el-tab-pane> </el-tab-pane>
<template v-else> <template v-else>
<el-tab-pane label="附表一" name="four"> <el-tab-pane label="附表一" name="four">
<Table ref="table1" :tabel-header="arrayGroup[0].header" :table-data.sync="fubiao1" /> <Table
ref="table1"
:tabel-header="arrayGroup[0].header"
:table-data.sync="fubiao1"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附表二" name="five"> <el-tab-pane label="附表二" name="five">
<Table ref="table2" :tabel-header="arrayGroup[1].header" :table-data.sync="fubiao2" /> <Table
ref="table2"
:tabel-header="arrayGroup[1].header"
:table-data.sync="fubiao2"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="fromType === 1 || fromType === 3" label="附表3" name="six"> <el-tab-pane
<phxsb ref="table3" :table-data.sync="fubiao3" :ysjl-param.sync="param" @loadPhxsImage="loadPhxsImage" /> v-if="fromType === 1 || fromType === 3"
label="附表3"
name="six"
>
<phxsb
ref="table3"
:table-data.sync="fubiao3"
:ysjl-param.sync="param"
@loadPhxsImage="loadPhxsImage"
/>
</el-tab-pane> </el-tab-pane>
</template> </template>
</el-tabs> </el-tabs>
@ -833,6 +864,7 @@ export default {
if (fubiao[2]) { if (fubiao[2]) {
this.fubiao3 = fubiao[2] this.fubiao3 = fubiao[2]
} }
console.log(this.fubiao1)
}) })
}, },
getYsjl() { getYsjl() {
@ -856,11 +888,9 @@ export default {
}, },
getParam() { getParam() {
const id = this.ysjlId || this.$route.query.templateId const id = this.ysjlId || this.$route.query.templateId
this.ysjlService this.ysjlService.getParam(id, this.$route.query.sbzldm).then((data) => {
.getParam(id, this.$route.query.sbzldm) this.param = data
.then((data) => { })
this.param = data
})
}, },
judgeRepeat(bianhao, id) { judgeRepeat(bianhao, id) {
this.api({ this.api({
@ -880,18 +910,22 @@ export default {
}, },
getJyxm(sort) { getJyxm(sort) {
if (this.$route.query.state === 'update') { if (this.$route.query.state === 'update') {
this.jyxmService.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => { this.jyxmService
this.bgfyData = data .getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort)
this.tableJs.getData(this.cols, this.rows, this.bgfyData) .then((data) => {
}) this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
})
} else { } else {
this.jyxmService.getCyJyxm(this.$route.query.templateId, sort).then((data) => { this.jyxmService
data.forEach(row => { .getCyJyxm(this.$route.query.templateId, sort)
row.dicJyxmId = row.id .then((data) => {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
}) })
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
})
} }
}, },
getDicJyxm(sort) { getDicJyxm(sort) {
@ -936,21 +970,21 @@ export default {
customClearSign(fieldName) { customClearSign(fieldName) {
const data = { const data = {
id: id:
this.ysjl.jianyanrenyuan && this.ysjl.jianyanrenyuan &&
this.common this.common
.deleteElement( .deleteElement(
this.ysjl.jianyanrenyuan.split(','), this.ysjl.jianyanrenyuan.split(','),
String(this.$store.getters.userId) String(this.$store.getters.userId)
) )
.join(','), .join(','),
name: name:
this.jianyanrenyuan && this.jianyanrenyuan &&
this.common this.common
.deleteElement( .deleteElement(
this.jianyanrenyuan.split(','), this.jianyanrenyuan.split(','),
this.$store.getters.nickname this.$store.getters.nickname
) )
.join(','), .join(','),
fieldName: fieldName fieldName: fieldName
} }
this.signNameValue(data) this.signNameValue(data)
@ -988,14 +1022,20 @@ export default {
this.save(operation, 'post', tableData, fubiao) this.save(operation, 'post', tableData, fubiao)
} else if (operation === 'build') { } else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao this.ysjl.baogaobianhao = this.ysjl.jilubianhao
if (this.ysjl.jilubianhao && this.ysjl.jilubianhao.indexOf('COPY') > -1) { if (
this.ysjl.jilubianhao &&
this.ysjl.jilubianhao.indexOf('COPY') > -1
) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请先修改报告编号,不允许携带COPY标志生成报告!' message: '请先修改报告编号,不允许携带COPY标志生成报告!'
}) })
return false return false
} }
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') { if (
this.ysjl.jianyanrenyuan === null ||
this.ysjl.jianyanrenyuan === ''
) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请先签名再生成报告!' message: '请先签名再生成报告!'
@ -1004,7 +1044,9 @@ export default {
} }
for (let i = 0; i < this.bgfyData.length; i++) { for (let i = 0; i < this.bgfyData.length; i++) {
if (!this.bgfyData[i].jianjianyuan || !this.bgfyData[i].querenriqi) { if (!this.bgfyData[i].jianjianyuan || !this.bgfyData[i].querenriqi) {
this.$message.error('请将检验项目中的监检人员及监检日期填写完毕,再生成报告!') this.$message.error(
'请将检验项目中的监检人员及监检日期填写完毕,再生成报告!'
)
return false return false
} }
} }
@ -1082,15 +1124,17 @@ export default {
if (!this.pic) { if (!this.pic) {
return false return false
} }
this.uploadService.uploadPhxsBase64File({ this.uploadService
ysjlId: this.ysjl.id, .uploadPhxsBase64File({
base64File: this.pic, ysjlId: this.ysjl.id,
shebeizhongleidaima: this.ysjl.shebeizhongleidaima base64File: this.pic,
}).then(() => { shebeizhongleidaima: this.ysjl.shebeizhongleidaima
if (operation !== 'add') { })
this.buildSaveData(operation) .then(() => {
} if (operation !== 'add') {
}) this.buildSaveData(operation)
}
})
}, },
/** /**

35
src/views/ysjl/3000/dj/common/zdftFb.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-table :data="tableData" style="width: 50%"> <el-table :data="data" style="width: 50%">
<el-table-column label="" prop="D2" /> <el-table-column label="" prop="D2" />
<el-table-column label="制停距离(m)" prop="D1"> <el-table-column label="制停距离(m)" prop="D1">
<template slot-scope="scope"> <template slot-scope="scope">
@ -18,6 +18,10 @@ export default {
tableData: { tableData: {
type: Array, type: Array,
required: true required: true
},
state: {
type: String,
require: true
} }
}, },
data() { data() {
@ -37,7 +41,34 @@ export default {
} }
] ]
} }
} },
computed: {
data() {
if (this.state == 'create') {
const arr = [
{
D2: '第一次',
D1: ''
},
{
D2: '第二次',
D1: ''
},
{
D2: '第三次',
D1: ''
}
]
return arr
} else {
return this.tableData
}
}
},
mounted() {
},
methods: {}
} }
</script> </script>

9
src/views/ysjl/3000/dj/yeyin/index.vue

@ -63,16 +63,21 @@ export default {
header: [ header: [
{ {
label: '层站', label: '层站',
prop: 'D8', prop: 'D9',
type: 1 type: 1
}, },
{ {
label: '6.3施力层门间隙', label: '6.3施力层门间隙',
prop: 'D7', prop: 'D8',
type: 1 type: 1
}, },
{ {
label: '6.3门扇与门扇', label: '6.3门扇与门扇',
prop: 'D7',
type: 1
},
{
label: '6.3门扇与立柱',
prop: 'D6', prop: 'D6',
type: 1 type: 1
}, },

12
src/views/ysjl/3000/dj/zdft/index.vue

@ -25,17 +25,7 @@ export default {
prop: 'D1', prop: 'D1',
type: 1 type: 1
} }
], ]
data: [{
D2: '第一次',
D1: ''
}, {
D2: '第二次',
D1: ''
}, {
D2: '第三次',
D1: ''
}]
} }
], ],
tableHeader2: [ tableHeader2: [

Loading…
Cancel
Save