[update] 清空首页内容

This commit is contained in:
lideqin
2023-09-07 17:33:51 +08:00
parent d45ee8d81f
commit 397f30423a
+1 -247
View File
@@ -1,266 +1,20 @@
<template>
<div>
<a-button @click="toSearchWindow">跳转一般检索</a-button>
<i class="iconfont icon-chexiao" style="color: #D52C26"></i>
<i class="iconfont icon-star" style="color: #D52C26"></i>
<i class="iconfont icon-water-drop-slash" style="color: #D52C26"></i>
<i class="iconfont icon-star1" style="color: #D52C26"></i>
<i class="iconfont icon-jiedian" style="color: #D52C26"></i>
<i class="iconfont icon-user" style="color: #D52C26"></i>
<i class="iconfont icon-bianji" style="color: #D52C26"></i>
<i class="iconfont icon-shanchu_" style="color: #D52C26"></i>
<i class="iconfont icon-chat" style="color: #D52C26"></i>
<i class="iconfont icon-edit-1" style="color: #D52C26"></i>
<i class="iconfont icon-fangxingfenxiang" style="color: #D52C26"></i>
<i class="iconfont icon-chart-pie" style="color: #D52C26"></i>
<i class="iconfont icon-root-list" style="color: #D52C26"></i>
<i class="iconfont icon-save" style="color: #D52C26"></i>
<!-- <j-expand-table-->
<!-- :columns="columns"-->
<!-- :dataSource="dataSource"-->
<!-- :extraForm="extraForm"-->
<!-- formIsDepend="feedback"-->
<!-- ref="jExpandTable">-->
<!-- <template slot="feedback" slot-scope="{text, record}">-->
<!-- <j-dict-select-tag style="width: 100%" dict-code="field_show_type" v-model="record.feedback"></j-dict-select-tag>-->
<!-- </template>-->
<!-- </j-expand-table>-->
<j-expand-table
:columns="columns"
:dataSource="dataSource"
:extraForm="extraForm"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:formIsDepend="false"
:pagination="ipagination"
ref="jExpandTable">
<template slot="feedback" slot-scope="{text, record}">
<j-dict-select-tag style="width: 100%" dict-code="field_show_type" v-model="record.feedback"></j-dict-select-tag>
</template>
</j-expand-table>
<a-button @click="submit">提交</a-button>
</div>
</template>
<script>
import JExpandTable from '../../components/JExpandTable'
import JDictSelectTag from '../../components/dict/JDictSelectTag'
export default {
name: 'Analysis',
components: { JExpandTable, JDictSelectTag },
data () {
return {
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
selectedRowKeys: [],
columns: [
{
title: '标准号/条款号',
dataIndex: 'number',
key: 'number',
scopedSlots: {
customRender: 'text'
}
},
{
title: '标准名称/条款名称',
dataIndex: 'name',
key: 'name',
scopedSlots: {
customRender: 'text'
}
},
{
title: '条款内容',
dataIndex: 'content',
key: 'content',
scopedSlots: {
customRender: 'text'
}
},
{
title: '历史评估结果',
dataIndex: 'result',
key: 'result',
scopedSlots: {
customRender: 'text'
}
},
{
title: '上一节点处理人',
dataIndex: 'resulter',
key: 'resulter',
scopedSlots: {
customRender: 'text'
}
},
{
title: '评估反馈',
dataIndex: 'feedback',
key: 'feedback',
scopedSlots: {
customRender: 'feedback'
}
}
],
dataSource: [
{
key: 1,
name: 'John Brown',
number: 32,
content: 'New York No. 1 Lake Park',
result: 'My name is John Brown, I am 32 years old, living in New York No. 1 Lake Park.',
feedback: '1'
},
{
key: 2,
name: 'John Brown',
number: 32,
content: 'New York No. 1 Lake Park',
result: 'My name is John Brown, I am 32 years old, living in New York No. 1 Lake Park.',
feedback: '1'
}
],
// extraForm: {
// 1: {
// rules: {
// desc: { required: true, message: '请输入依据描述', trigger: 'blur' },
// file: { required: false, message: '请上传佐证材料', trigger: 'change' }
// },
// formArr: [
// {
// fieldShowType: 1,
// dbFieldTxt: '依据描述',
// dbFieldName: 'desc'
// },
// {
// fieldShowType: 2,
// dbFieldTxt: '佐证材料',
// dbFieldName: 'file'
// }
// ]
// },
// 2: {
// rules: {
// desc: { required: true, message: '请输入依据描述', trigger: 'blur' },
// finishDate: { required: true, message: '请选择预计整改完成时间', trigger: 'change' }
// },
// formArr: [
// {
// fieldShowType: 1,
// dbFieldTxt: '依据描述',
// fieldMustInput: true,
// dbFieldName: 'desc'
// },
// {
// fieldShowType: 3,
// dbFieldTxt: '预计整改完成时间',
// fieldMustInput: true,
// dbFieldName: 'finishDate'
// }
// ]
// },
// 3: {
// rules: {
// desc: { required: true, message: '请输入依据描述', trigger: 'blur' },
// finishDate: { required: true, message: '请选择预计整改完成时间', trigger: 'change' }
// },
// formArr: [
// {
// fieldShowType: 1,
// dbFieldTxt: '依据描述',
// fieldMustInput: true,
// dbFieldName: 'desc'
// },
// {
// fieldShowType: 3,
// dbFieldTxt: '预计整改完成时间',
// fieldMustInput: true,
// dbFieldName: 'finishDate'
// }
// ]
// },
// 4: {
// rules: {
// desc: { required: true, message: '请输入依据描述', trigger: 'blur' }
// },
// formArr: [
// {
// fieldShowType: 1,
// dbFieldTxt: '依据描述',
// fieldMustInput: true,
// dbFieldName: 'desc'
// }
// ]
// }
// },
extraForm: {
rules: {
desc: { required: false, message: '请输入依据描述', trigger: 'blur' },
file: { required: false, message: '请上传佐证材料', trigger: 'change' },
tokenNum: { required: true, message: '请输入工作令编号', trigger: 'blur' },
itemName: { required: true, message: '请输入项目名称', trigger: 'blur' }
},
formArr: [
{
fieldShowType: 1,
dbFieldTxt: '依据描述',
dbFieldName: 'desc',
isDisabled: true
},
{
fieldShowType: 2,
dbFieldTxt: '佐证材料',
dbFieldName: 'file',
isDisabled: true
},
{
fieldShowType: 4,
dbFieldTxt: '工作令编号',
dbFieldName: 'tokenNum'
},
{
fieldShowType: 4,
dbFieldTxt: '项目名称',
dbFieldName: 'itemName'
}
]
}
}
},
created () {
},
methods: {
// 点击跳转到检索页
toSearchWindow () {
const { href } = this.$router.resolve({
path: '/generalSearch'
})
window.open(href, '_blank')
},
onSelectChange (selectRowKeys) {
this.selectedRowKeys = selectRowKeys
},
submit () {
// 获取表格扩展部分的校验结果
const result = this.$refs.jExpandTable.submit()
if (result) {
// 每个表单校验都通过了
console.log('通过了', this.dataSource)
} else {
// 有表单没有通过
this.$message.warning('请输入必填项')
}
}
}
}
</script>