Commit e933a4dd by xiehao

fix:删除了试用范围

1 parent fdac565e
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
import { EADC_ARRCHITECTURE, EADC_KNOWLEDGE_POOL, EADC_SHARED_ABILITY } from '@/config/micromodule' import { EADC_ARRCHITECTURE, EADC_KNOWLEDGE_POOL, EADC_SHARED_ABILITY } from '@/config/micromodule'
// 收集资料配置 查询 // 收集资料配置 查询
export const collectDataSearch = EADC_ARRCHITECTURE + '/Collect/CollectInformation/' export const collectDataSearch = EADC_ARRCHITECTURE + '/collect/collectInformation/'
// 弹框内表格查询 prjCode: 不传 查全部 选择传,拼接的id // 弹框内表格查询 prjCode: 不传 查全部 选择传,拼接的id
export const collectDataConfiguration = EADC_ARRCHITECTURE + '/Collect/information/' export const collectDataConfiguration = EADC_ARRCHITECTURE + '/collect/information/'
// 督查材料收集 查询 // 督查材料收集 查询
export const supervisionData = EADC_ARRCHITECTURE + '/Collect/supervisionData/' export const supervisionData = EADC_ARRCHITECTURE + '/collect/supervisionData/'
// 架构督查分析 查询 tab1 tab2 // 架构督查分析 查询 tab1 tab2
export const architectureInspectionAnalysis = EADC_ARRCHITECTURE + '/supervIndex/selectSupervIndex' export const architectureInspectionAnalysis = EADC_ARRCHITECTURE + '/supervIndex/selectSupervIndex'
export const selectSupervAnalysis = EADC_ARRCHITECTURE + '/supervAnalysis/selectSupervAnalysis' export const selectSupervAnalysis = EADC_ARRCHITECTURE + '/supervAnalysis/selectSupervAnalysis'
......
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
materialType, materialType,
supervision: this.rowData.supervision supervision: this.rowData.supervision
} }
let url = !this.edit ? '/Collect/ad' : '/Collect/upd' // 编辑 let url = !this.edit ? '/collect/ad' : '/collect/upd' // 编辑
this.$postRequest(url, params).then(res => { this.$postRequest(url, params).then(res => {
if (res.code === 200) { if (res.code === 200) {
loading.close() loading.close()
......
...@@ -46,19 +46,17 @@ export default { ...@@ -46,19 +46,17 @@ export default {
if(v){ if(v){
this.columns = [ this.columns = [
{ label: '序号', type: 'index', width: '80px' }, { label: '序号', type: 'index', width: '80px' },
{ label: '单位', prop: 'manageDeptId', width: '150px' }, { label: '单位', prop: 'manageDeptName', width: '150px' },
{ label: '项目名称', prop: 'prjName', }, { label: '项目名称', prop: 'prjName', },
{ label: '项目经理', prop: 'projectManager', width: '200px' }, { label: '项目经理', prop: 'projectManager', width: '200px' },
{ label: '创建人', prop: 'createMan', width: '150px' },
] ]
}else{ }else{
this.columns = [ this.columns = [
{ type: 'selection', width: '55px' }, { type: 'selection', width: '55px' },
{ label: '序号', type: 'index', width: '80px' }, { label: '序号', type: 'index', width: '80px' },
{ label: '单位', prop: 'manageDeptId', width: '150px' }, { label: '单位', prop: 'manageDeptName', width: '150px' },
{ label: '项目名称', prop: 'prjName', }, { label: '项目名称', prop: 'prjName', },
{ label: '项目经理', prop: 'projectManager', width: '200px' }, { label: '项目经理', prop: 'projectManager', width: '200px' },
{ label: '创建人', prop: 'createMan', width: '150px' },
] ]
} }
}, },
......
<template> <template>
<div class="searchTable"> <div class="searchTable">
<list-page> <list-page>
<!-- 查询表单插槽 --> <!-- 查询表单插槽 -->
<template #formWrap> <template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" /> <SearchForm @onSearch="querySearch" :form-options="formOptions"/>
</template> </template>
<!-- 中部操作按钮 --> <!-- 中部操作按钮 -->
<template #operationWrap> <template #operationWrap>
<el-button type="primary" icon="el-icon-document-add" size="medium" plain @click="fnAdd">新建</el-button > <el-button type="primary" icon="el-icon-document-add" size="medium" plain @click="fnAdd">新建</el-button>
</template> </template>
<!-- 表格插槽 --> <!-- 表格插槽 -->
<template #tableWrap> <template #tableWrap>
<table-config <table-config
ref="searchTable" ref="searchTable"
:query="query" :query="query"
:columns="columns" :columns="columns"
id-key="elementId" id-key="elementId"
> >
<template #supervision="{ data }"> <template #supervision="{ data }">
<el-button v-if="data.row.supervision" class="detailBtn" size="medium" @click="detailBtn( data.row)">{{data.row.supervision}}</el-button > <el-button v-if="data.row.supervision" class="detailBtn" size="medium" @click="detailBtn( data.row)">{{ data.row.supervision }}</el-button>
<span v-else>{{data.row.supervision}}</span> <span v-else>{{ data.row.supervision }}</span>
</template> </template>
</table-config> </table-config>
</template> </template>
</list-page> </list-page>
<!-- 新增弹窗 --> <!-- 新增弹窗 -->
<Add <Add
@querySearch="querySearch" @querySearch="querySearch"
:visible.sync="visible" :visible.sync="visible"
:row-data="rowData" :row-data="rowData"
:title="dialogTitle" :title="dialogTitle"
@addList='addList' @addList='addList'
:edit='isEdit' :edit='isEdit'
></Add> ></Add>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="Detail" :prjCodeDetail='detailPrjCode' :visible.sync="visibleDetail" @selectTabel='selectTabel' :title="detailTitle"/> <Detail ref="Detail" :prjCodeDetail='detailPrjCode' :visible.sync="visibleDetail" @selectTabel='selectTabel' :title="detailTitle"/>
...@@ -43,225 +43,228 @@ import AddTabelList from './AddTabelList.vue' ...@@ -43,225 +43,228 @@ import AddTabelList from './AddTabelList.vue'
import ListPage from '@/components/ListPage.vue' import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue' import SearchForm from '@/components/SearchForm.vue'
import TableConfig from './TableConfig.vue' import TableConfig from './TableConfig.vue'
import { collectDataSearch } from '@/api/architectureInspection' import {collectDataSearch} from '@/api/architectureInspection'
import Add from './Add.vue' import Add from './Add.vue'
import Detail from './Detail.vue' import Detail from './Detail.vue'
import { materialTypeList, stateCode } from '@/utils/architectureInspectionDis' import {materialTypeList, stateCode} from '@/utils/architectureInspectionDis'
export default { export default {
name: 'collectDataConfiguration', name: 'collectDataConfiguration',
components: { ListPage, SearchForm, TableConfig, Add, AddTabelList, Detail }, components: {ListPage, SearchForm, TableConfig, Add, AddTabelList, Detail},
computed: { computed: {
formOptions() { formOptions() {
return [ return [
{ {
label: '督查方案名称', // label文字 label: '督查方案名称', // label文字
prop: 'prjCode', // 字段名 prop: 'prjCode', // 字段名
element: 'el-input', // 指定elementui组件 element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性 placeholder: '请输入内容', // elementui组件属性
},
]
}, },
columns() { ]
return [
{ label: '序号', type: 'index', width: '80px' },
{ label: '督查方案名称', prop: 'supervName', },
{ label: '创建时间', prop: 'createTime', width: '120px' },
{ label: '材料类型', prop: 'materialType',
collectionType: 'materialTypeList',
options: materialTypeList
},
{ label: '截止时间', prop: 'endTime', width: '120px' },
{ label: '督查清单', prop: 'supervision', __slotName: 'supervision', },
{
label: '状态',
prop: 'state',
width: '120px',
collectionType: 'stateCode',
options: stateCode,
},
{ 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.state == '1' ? true : false
},
},
{
title: '删除',
type: 'danger',
size: 'mini',
plain: true,
icon: 'el-icon-delete',
disabledCallback: (row, title) => {
return row.state == '1' ? true : false
},
},
{
title: '发布',
size: 'mini',
icon: 'el-icon-circle-check',
type: 'primary',
plain: true,
disabledCallback: (row, title) => {
return row.state == '1' ? true : false
},
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
},
]
},
},
data(){
return {
query: {
url: collectDataSearch,
method: 'post',
queryParam: {
supervName: ''
},
},
visible: false,
rowData: {},
dialogTitle: '',
approvalVisible: false,
selectRows: [],
selectId: '',
prjCode: '',
detailTitle: '详情',
visibleDetail: false,
detailPrjCode: '',
isEdit: false
}
}, },
columns() {
methods: { return [
querySearch(data) { {label: '序号', type: 'index', width: '80px'},
this.query.queryParam = { {label: '督查方案名称', prop: 'supervName',},
...this.query.queryParam, {
...data, label: '材料类型', prop: 'materialType',
} collectionType: 'materialTypeList',
this.$refs.searchTable.queryData() options: materialTypeList
}, },
fnAdd() { {label: '督查清单', prop: 'supervision', __slotName: 'supervision',},
this.visible = true {
this.rowData = {} label: '状态',
this.dialogTitle = '收集资料配置' prop: 'state',
this.isEdit = false width: '120px',
collectionType: 'stateCode',
options: stateCode,
}, },
/** {label: '备注', prop: 'notes', width: '100px'},
* @description: 操作按钮 {label: '创建时间', prop: 'createTime', width: '120px'},
* @param {Object} row 当前操作行数据 {label: '截止时间', prop: 'endTime', width: '120px'},
* @param {String} title 当前操作按钮名称 {
* @author: pan label: '操作',
*/ type: 'operation',
fnOperation(row, title) { width: '360px',
switch (title) { actionButtons: [
case '编辑': {
this.fnEdit(row) title: '编辑',
break type: 'primary',
case '删除': size: 'mini',
this.fnDel(row) plain: true,
break icon: 'el-icon-edit',
case '发布': disabledCallback: (row, title) => {
this.fnSubmit(row) return row.state == '1' ? true : false
default: },
break },
} {
title: '删除',
type: 'danger',
size: 'mini',
plain: true,
icon: 'el-icon-delete',
disabledCallback: (row, title) => {
return row.state == '1' ? true : false
},
},
{
title: '发布',
size: 'mini',
icon: 'el-icon-circle-check',
type: 'primary',
plain: true,
disabledCallback: (row, title) => {
return row.state == '1' ? true : false
},
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
}, },
fnSubmit(row) { ]
this.$confirm('是否确认发布?', '提示', { },
confirmButtonText: '确认', },
cancelButtonText: '取消', data() {
type: 'warning', return {
}) query: {
.then(() => { url: collectDataSearch,
const params = { method: 'post',
...row, queryParam: {
state: 2, supervName: ''
}
this.$postRequest('/Collect/fb', {...row}).then(res => {
if (res.code === 200) {
this.$message.success('发布成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
}, },
fnDel(row) { },
this.$confirm('是否确认删除?', '提示', { visible: false,
confirmButtonText: '确认', rowData: {},
cancelButtonText: '取消', dialogTitle: '',
type: 'warning', approvalVisible: false,
selectRows: [],
selectId: '',
prjCode: '',
detailTitle: '详情',
visibleDetail: false,
detailPrjCode: '',
isEdit: false
}
},
methods: {
querySearch(data) {
this.query.queryParam = {
...this.query.queryParam,
...data,
}
this.$refs.searchTable.queryData()
},
fnAdd() {
this.visible = true
this.rowData = {}
this.dialogTitle = '收集资料配置'
this.isEdit = false
},
/**
* @description: 操作按钮
* @param {Object} row 当前操作行数据
* @param {String} title 当前操作按钮名称
* @author: pan
*/
fnOperation(row, title) {
switch (title) {
case '编辑':
this.fnEdit(row)
break
case '删除':
this.fnDel(row)
break
case '发布':
this.fnSubmit(row)
default:
break
}
},
fnSubmit(row) {
this.$confirm('是否确认发布?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
const params = {
...row,
state: 2,
}
this.$postRequest('/collect/fb', {...row}).then(res => {
if (res.code === 200) {
this.$message.success('发布成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
}) })
.then(() => { })
const params = { .catch(() => {
...row, })
delFlag: 1, },
} fnDel(row) {
this.$postRequest('/Collect/del', {supervId: row.supervId}).then(res => { this.$confirm('是否确认删除?', '提示', {
if (res.code === 200) { confirmButtonText: '确认',
this.$message.success('删除成功') cancelButtonText: '取消',
this.$refs.searchTable.queryData() type: 'warning',
} else { })
this.$message.error('删除失败') .then(() => {
} const params = {
}) ...row,
delFlag: 1,
}
this.$postRequest('/collect/del', {supervId: row.supervId}).then(res => {
if (res.code === 200) {
this.$message.success('删除成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error('删除失败')
}
}) })
.catch(() => {}) })
}, .catch(() => {
fnEdit(row) { })
this.dialogTitle = '收集资料配置' },
this.rowData = row fnEdit(row) {
this.visible = true this.dialogTitle = '收集资料配置'
this.isEdit = true this.rowData = row
}, this.visible = true
addList(){ this.isEdit = true
this.detailTitle = '督查清单' },
this.detailPrjCode = '' addList() {
this.visibleDetail = true this.detailTitle = '督查清单'
}, this.detailPrjCode = ''
// 督查清单 详情 this.visibleDetail = true
detailBtn(v){ },
this.detailTitle = '详情' // 督查清单 详情
this.detailPrjCode = v.supervision detailBtn(v) {
this.visibleDetail = true this.detailTitle = '详情'
}, this.detailPrjCode = v.supervision
selectTabel(v){ this.visibleDetail = true
let id = this.rowData.supervision },
let arrV = v.split(',') selectTabel(v) {
let arrId = id.split(',') let id = this.rowData.supervision
let arr = [...arrV, ...arrId] let arrV = v.split(',')
this.rowData.supervision = !!v ? Array.from(new Set(arr)).join(',') : id let arrId = id.split(',')
// this.rowData.supervision = !!v ? v +','+id : id let arr = [...arrV, ...arrId]
}, this.rowData.supervision = !!v ? Array.from(new Set(arr)).join(',') : id
} // this.rowData.supervision = !!v ? v +','+id : id
},
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.detailBtn{ .detailBtn {
border: none; border: none;
background: none; background: none;
color: #0d867f; color: #0d867f;
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
</style> </style>
\ 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!