Commit 41a8eb9e by xiehao

fix:删除了试用范围

1 parent 6fb5fd86
Showing with 190 additions and 177 deletions
<template>
<div class="searchTable">
<list-page>
<!-- 查询表单插槽 -->
<template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" />
</template>
<!-- 表格插槽 -->
<template #tableWrap>
<table-config
ref="searchTable"
:query="query"
:columns="columns"
id-key="elementId"
>
</table-config>
</template>
<!-- 查询表单插槽 -->
<template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions"/>
</template>
<!-- 表格插槽 -->
<template #tableWrap>
<table-config
ref="searchTable"
:query="query"
:columns="columns"
id-key="elementId"
>
</table-config>
</template>
</list-page>
<UploadDialog
:row-data="rowData"
@querySearch="querySearch"
title="上传"
:visible.sync="demandSubVisible"
:row-data="rowData"
@querySearch="querySearch"
title="上传"
:visible.sync="demandSubVisible"
/>
</div>
</template>
......@@ -29,175 +29,187 @@
import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/views/collectDataConfiguration/TableConfig.vue'
import { supervisionData } from '@/api/architectureInspection'
import { materialTypeList, superStateCode } from '@/utils/architectureInspectionDis'
import {supervisionData} from '@/api/architectureInspection'
import {materialTypeList} from '@/utils/architectureInspectionDis'
import UploadDialog from './UploadDialog'
import {getDictTypeOptions} from "@/utils";
export default {
name: 'supervisionDataCollection',
components: { ListPage, SearchForm, TableConfig, UploadDialog },
computed: {
formOptions() {
return [
{
label: '项目名称', // label文字
prop: 'prjName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
]
name: 'supervisionDataCollection',
components: {ListPage, SearchForm, TableConfig, UploadDialog},
computed: {
formOptions() {
return [
{
label: '项目名称', // label文字
prop: 'prjName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
columns() {
return [
{ type: 'selection', width: '55px' },
{ label: '序号', type: 'index', width: '80px' },
{ label: '项目名称', prop: 'prjName', },
{ label: '承建单位', prop: 'buildOrg', width: '120px' },
{ label: '督查方案', prop: 'supervName', width: '120px' },
{ label: '材料类型', prop: 'materialType',
collectionType: 'materialTypeList',
options: materialTypeList
},
{ label: '上传时间', prop: 'uploadedTime', width: '120px' },
{ label: '版本', prop: 'version', width: '120px' },
// {
// label: '状态',
// prop: 'state',
// width: '120px',
// collectionType: 'superStateCode',
// options: superStateCode,
// },
{ label: '备注', prop: 'notes', width: '100px' },
{
label: '操作',
type: 'operation',
width: '360px',
actionButtons: [
{
title: '上传',
type: 'primary',
size: 'mini',
plain: true,
icon: 'el-icon-edit',
disabledCallback: (row, title) => {
return row.file == '1' ? true : false
},
},
{
title: '归档',
type: 'warning',
size: 'mini',
plain: true,
icon: 'el-icon-circle-check',
disabledCallback: (row, title) => {
return row.file == '1' ? true : false
},
},
{
title: '提醒',
size: 'mini',
icon: 'el-icon-circle-check',
type: 'warning',
plain: true,
disabledCallback: (row, title) => {
if (row.file == '1' || row.remind == '1') {
return true
} else {
return false
}
},
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
},
]
},
},
data(){
return {
query: {
url: supervisionData,
method: 'post',
queryParam: {
prjName: ''
},
},
rowData: {},
demandSubVisible: false,
}
]
},
methods: {
querySearch(data) {
this.query.queryParam = {
...this.query.queryParam,
...data,
}
this.$refs.searchTable.queryData()
columns() {
return [
{type: 'selection', width: '55px'},
{label: '序号', type: 'index', width: '80px'},
{label: '项目名称', prop: 'prjName',},
{
label: '承建单位',
prop: 'buildOrg',
options: this.sysBuildOrgOptions,
collectionType: true,
width: '300px',
},
/**
* @description: 操作按钮
* @param {Object} row 当前操作行数据
* @param {String} title 当前操作按钮名称
* @author: pan
*/
fnOperation(row, title) {
switch (title) {
case '上传':
this.fnEdit(row)
break
case '归档':
this.fnFile(row)
break
case '提醒':
this.fnRemind(row)
default:
break
}
{label: '督查方案', prop: 'supervName', width: '120px'},
{
label: '材料类型', prop: 'materialType',
collectionType: 'materialTypeList',
options: materialTypeList
},
fnRemind(row) {
this.$confirm('是否确认提醒?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.$postRequest('/collect/tx', {id: row.id}).then(res => {
if (res.code === 200) {
this.$message.success('提醒成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
{label: '上传时间', prop: 'uploadedTime', width: '120px'},
{label: '版本', prop: 'version', width: '120px'},
{label: '备注', prop: 'notes', width: '100px'},
{
label: '操作',
type: 'operation',
width: '360px',
actionButtons: [
{
title: '上传',
type: 'primary',
size: 'mini',
plain: true,
icon: 'el-icon-edit',
disabledCallback: (row, title) => {
return row.file == '1' ? true : false
},
},
{
title: '归档',
type: 'warning',
size: 'mini',
plain: true,
icon: 'el-icon-circle-check',
disabledCallback: (row, title) => {
return row.file == '1' ? true : false
},
},
{
title: '提醒',
size: 'mini',
icon: 'el-icon-circle-check',
type: 'warning',
plain: true,
disabledCallback: (row, title) => {
if (row.file == '1' || row.remind == '1') {
return true
} else {
return false
}
},
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
},
]
},
},
data() {
return {
query: {
url: supervisionData,
method: 'post',
queryParam: {
prjName: ''
},
fnFile(row) {
this.$confirm('是否确认归档?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
},
rowData: {},
demandSubVisible: false,
sysBuildOrgOptions: []
}
},
created() {
this.getDicts();
},
methods: {
getDicts() {
getDictTypeOptions('build_company').then((res) => {
this.sysBuildOrgOptions = res
})
},
querySearch(data) {
this.query.queryParam = {
...this.query.queryParam,
...data,
}
this.$refs.searchTable.queryData()
},
/**
* @description: 操作按钮
* @param {Object} row 当前操作行数据
* @param {String} title 当前操作按钮名称
* @author: pan
*/
fnOperation(row, title) {
switch (title) {
case '上传':
this.fnEdit(row)
break
case '归档':
this.fnFile(row)
break
case '提醒':
this.fnRemind(row)
default:
break
}
},
fnRemind(row) {
this.$confirm('是否确认提醒?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.$postRequest('/collect/tx', {id: row.id}).then(res => {
if (res.code === 200) {
this.$message.success('提醒成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
.then(() => {
this.$postRequest('/collect/gd', {...row}).then(res => {
if (res.code === 200) {
this.$message.success('归档成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {
})
},
fnFile(row) {
this.$confirm('是否确认归档?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.$postRequest('/collect/gd', {...row}).then(res => {
if (res.code === 200) {
this.$message.success('归档成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
.catch(() => {})
},
// 上传
fnEdit(row) {
this.rowData = row
this.demandSubVisible = true
},
})
.catch(() => {
})
},
// 上传
fnEdit(row) {
this.rowData = row
this.demandSubVisible = true
},
}
}
}
</script>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!