|
@@ -25,7 +25,13 @@
|
|
|
添加
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <a-table :data-source="data" :key="tableKey" :columns="columns" bordered ref="table" :scroll="{x: 1300 }">
|
|
|
+ <a-table
|
|
|
+ :data-source="data"
|
|
|
+ :key="tableKey"
|
|
|
+ :columns="columns"
|
|
|
+ bordered
|
|
|
+ ref="table"
|
|
|
+ :scroll="{x: 1300 }">
|
|
|
<span slot="level" slot-scope="text, record">
|
|
|
<a-select style="width:100%" @change="(val)=>changeLevel(val,record)" v-model="record.level" placeholder="请选择">
|
|
|
<a-select-option v-for="(label,value) in levelMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
@@ -84,9 +90,9 @@ import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
|
|
|
import { batch, getBySbId } from '@/api/check/checkstandard'
|
|
|
export default {
|
|
|
components: {
|
|
|
- SbInfoSelectModal,
|
|
|
+ SbInfoSelectModal
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
confirmLoading: false,
|
|
@@ -102,14 +108,14 @@ export default {
|
|
|
checked: true,
|
|
|
customRender: (text, record, index) => {
|
|
|
return index + 1
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
- {
|
|
|
+ /* {
|
|
|
title: '编码',
|
|
|
dataIndex: 'no',
|
|
|
width: '120px',
|
|
|
- checked: true,
|
|
|
- },
|
|
|
+ checked: true
|
|
|
+ }, */
|
|
|
{
|
|
|
title: () => {
|
|
|
return <span style="color:red">维护等级</span>
|
|
@@ -117,14 +123,14 @@ export default {
|
|
|
dataIndex: 'level',
|
|
|
width: '120px',
|
|
|
checked: true,
|
|
|
- scopedSlots: { customRender: 'level' },
|
|
|
+ scopedSlots: { customRender: 'level' }
|
|
|
},
|
|
|
{
|
|
|
title: '执行人方式',
|
|
|
dataIndex: 'checkUserType',
|
|
|
checked: true,
|
|
|
width: '120px',
|
|
|
- scopedSlots: { customRender: 'checkUserType' },
|
|
|
+ scopedSlots: { customRender: 'checkUserType' }
|
|
|
},
|
|
|
{
|
|
|
title: () => {
|
|
@@ -133,14 +139,14 @@ export default {
|
|
|
dataIndex: 'period',
|
|
|
width: '160px',
|
|
|
checked: true,
|
|
|
- scopedSlots: { customRender: 'period' },
|
|
|
+ scopedSlots: { customRender: 'period' }
|
|
|
},
|
|
|
{
|
|
|
title: '标准工时',
|
|
|
dataIndex: 'standardHours',
|
|
|
checked: true,
|
|
|
width: '120px',
|
|
|
- scopedSlots: { customRender: 'standardHours' },
|
|
|
+ scopedSlots: { customRender: 'standardHours' }
|
|
|
},
|
|
|
{
|
|
|
title: () => {
|
|
@@ -149,35 +155,35 @@ export default {
|
|
|
dataIndex: 'sort',
|
|
|
checked: true,
|
|
|
width: '80px',
|
|
|
- scopedSlots: { customRender: 'sort' },
|
|
|
+ scopedSlots: { customRender: 'sort' }
|
|
|
},
|
|
|
{
|
|
|
title: '上次实际执行日期',
|
|
|
dataIndex: 'lastDate',
|
|
|
checked: true,
|
|
|
scopedSlots: { customRender: 'lastDate' },
|
|
|
- width: '150px',
|
|
|
+ width: '150px'
|
|
|
},
|
|
|
{
|
|
|
title: '下次预计执行日期',
|
|
|
dataIndex: 'nextDate',
|
|
|
checked: true,
|
|
|
scopedSlots: { customRender: 'nextDate' },
|
|
|
- width: '150px',
|
|
|
+ width: '150px'
|
|
|
},
|
|
|
{
|
|
|
title: '检查项目',
|
|
|
dataIndex: 'requirement',
|
|
|
checked: true,
|
|
|
scopedSlots: { customRender: 'requirement' },
|
|
|
- width: '300px',
|
|
|
+ width: '300px'
|
|
|
},
|
|
|
{
|
|
|
title: '检查标准',
|
|
|
dataIndex: 'remark',
|
|
|
checked: true,
|
|
|
scopedSlots: { customRender: 'remark' },
|
|
|
- width: '300px',
|
|
|
+ width: '300px'
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -186,15 +192,15 @@ export default {
|
|
|
checked: true,
|
|
|
fixed: 'right',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'action' },
|
|
|
- },
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
+ }
|
|
|
],
|
|
|
levelMap: {},
|
|
|
checkUserTypeMap: {},
|
|
|
- periodTypeMap: {},
|
|
|
+ periodTypeMap: {}
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.paramTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_PARAM_TYPE)
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_TYPE)
|
|
|
this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
|
|
@@ -204,19 +210,19 @@ export default {
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_LEVEL)
|
|
|
},
|
|
|
methods: {
|
|
|
- base(record) {
|
|
|
+ base (record) {
|
|
|
this.visible = true
|
|
|
if (this.BaseTool.Object.isBlank(record)) {
|
|
|
return
|
|
|
}
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(
|
|
|
Object.assign({
|
|
|
sbId: record.id,
|
|
|
- sbNo: record.no,
|
|
|
+ sbNo: record.no
|
|
|
})
|
|
|
)
|
|
|
})
|
|
@@ -224,33 +230,33 @@ export default {
|
|
|
this.data = res.data.list
|
|
|
})
|
|
|
},
|
|
|
- handleCancel() {
|
|
|
+ handleCancel () {
|
|
|
this.data = []
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
this.$emit('ok')
|
|
|
this.form.resetFields()
|
|
|
},
|
|
|
- handleAdd() {
|
|
|
+ handleAdd () {
|
|
|
this.data.push({})
|
|
|
},
|
|
|
- handleCopy(record) {
|
|
|
+ handleCopy (record) {
|
|
|
const newVal = this.BaseTool.Object.copy(record)
|
|
|
delete newVal.id
|
|
|
this.data.push(newVal)
|
|
|
},
|
|
|
- handleDelOne(record, i) {
|
|
|
+ handleDelOne (record, i) {
|
|
|
this.data.splice(i, 1)
|
|
|
},
|
|
|
- changeLevel(value, record) {
|
|
|
+ changeLevel (value, record) {
|
|
|
record.checkUserType = value
|
|
|
this.tableKey = new Date().getTime()
|
|
|
},
|
|
|
- handleSbSelectd(keys, rows) {
|
|
|
+ handleSbSelectd (keys, rows) {
|
|
|
const [key] = keys
|
|
|
const [row] = rows
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
this.sbId = key
|
|
|
// 日期处理
|
|
@@ -258,7 +264,7 @@ export default {
|
|
|
setFieldsValue(
|
|
|
Object.assign({
|
|
|
sbId: key,
|
|
|
- sbNo: row.no,
|
|
|
+ sbNo: row.no
|
|
|
})
|
|
|
)
|
|
|
})
|
|
@@ -266,12 +272,12 @@ export default {
|
|
|
this.data = res.data.list
|
|
|
})
|
|
|
},
|
|
|
- handleSbSelect() {
|
|
|
+ handleSbSelect () {
|
|
|
this.$refs.sbInfoSelectModal.base()
|
|
|
},
|
|
|
- save() {
|
|
|
+ save () {
|
|
|
const {
|
|
|
- form: { validateFieldsAndScroll },
|
|
|
+ form: { validateFieldsAndScroll }
|
|
|
} = this
|
|
|
this.confirmLoading = true
|
|
|
validateFieldsAndScroll((errors, values) => {
|
|
@@ -322,10 +328,10 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
-</style>
|
|
|
+</style>
|