Commit 6fb5fd86 by xiehao

fix:修改了建设单位

1 parent d9d79fc5
Showing with 109 additions and 90 deletions
...@@ -4,51 +4,54 @@ ...@@ -4,51 +4,54 @@
<template #tabWrap> <template #tabWrap>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
:label="item.label" :label="item.label"
:name="item.name" :name="item.name"
v-for="item in tabOptions" v-for="item in tabOptions"
:key="item.name" :key="item.name"
> >
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
<!-- 查询表单插槽 --> <!-- 查询表单插槽 -->
<template #formWrap> <template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" /> <SearchForm @onSearch="querySearch" :form-options="formOptions"/>
</template> </template>
<!-- 中部操作按钮 --> <!-- 中部操作按钮 -->
<template #operationWrap v-if="activeName == '1'"> <template #operationWrap v-if="activeName == '1'">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-document-add" icon="el-icon-document-add"
plain plain
@click="fnAdd" @click="fnAdd"
>新建</el-button >新建
</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 #indexLevel="{ data }"> <template #indexLevel="{ data }">
<el-button <el-button
v-if="data.row.indexLevel" v-if="data.row.indexLevel"
class="detailBtn" class="detailBtn"
@click="detailBtn(data.row)" @click="detailBtn(data.row)"
>指标清单</el-button >指标清单
</el-button
> >
<span v-else>{{ data.row.indexLevel }}</span> <span v-else>{{ data.row.indexLevel }}</span>
</template> </template>
<template #supervName="{ data }"> <template #supervName="{ data }">
<el-button <el-button
v-if="data.row.supervName" v-if="data.row.supervName"
class="detailBtn" class="detailBtn"
@click="supervNameDetailBtn(data.row)" @click="supervNameDetailBtn(data.row)"
>{{ data.row.supervName }}</el-button >{{ data.row.supervName }}
</el-button
> >
<span v-else>{{ data.row.supervName }}</span> <span v-else>{{ data.row.supervName }}</span>
</template> </template>
...@@ -57,17 +60,17 @@ ...@@ -57,17 +60,17 @@
</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"
></Add> ></Add>
<Detail <Detail
ref="Detail" ref="Detail"
:prjCodeDetail="detailPrjCode" :prjCodeDetail="detailPrjCode"
:title="detailTitle" :title="detailTitle"
:visible.sync="visibleDetail" :visible.sync="visibleDetail"
@editClick="fnEdit" @editClick="fnEdit"
/> />
</div> </div>
</template> </template>
...@@ -76,18 +79,17 @@ ...@@ -76,18 +79,17 @@
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 '@/views/collectDataConfiguration/TableConfig.vue' import TableConfig from '@/views/collectDataConfiguration/TableConfig.vue'
import { import {architectureInspectionAnalysis, selectSupervAnalysis,} from '@/api/architectureInspection'
architectureInspectionAnalysis, import {stateCode} from '@/utils/architectureInspectionDis'
selectSupervAnalysis,
} from '@/api/architectureInspection'
import { stateCode } from '@/utils/architectureInspectionDis'
import Add from './Add.vue' import Add from './Add.vue'
import Detail from './Detail.vue' import Detail from './Detail.vue'
import {getDictTypeOptions} from "@/utils";
import {getDeptOption, getOrgOption} from "@/api";
export default { export default {
name: 'architectureInspectionAnalysis', name: 'architectureInspectionAnalysis',
components: { ListPage, SearchForm, TableConfig, Add, Detail }, components: {ListPage, SearchForm, TableConfig, Add, Detail},
computed: { computed: {
formOptions() { formOptions() {
if (this.activeName === '1') { if (this.activeName === '1') {
...@@ -113,13 +115,13 @@ export default { ...@@ -113,13 +115,13 @@ export default {
columns() { columns() {
if (this.activeName === '1') { if (this.activeName === '1') {
return [ return [
{ label: '序号', type: 'index', width: '80px' }, {label: '序号', type: 'index', width: '80px'},
{ label: '督查方案名称', prop: 'supervName' }, {label: '督查方案名称', prop: 'supervName'},
{ label: '督查编码', prop: 'supervCode' }, {label: '督查编码', prop: 'supervCode'},
{ label: '指标名称', prop: 'indexName' }, {label: '指标名称', prop: 'indexName'},
{ label: '指标清单', prop: 'indexLevel', __slotName: 'indexLevel' }, {label: '指标清单', prop: 'indexLevel', __slotName: 'indexLevel'},
{ label: '指标权重', prop: 'weight' }, {label: '指标权重', prop: 'weight'},
{ label: '创建时间', prop: 'createTime' }, {label: '创建时间', prop: 'createTime'},
{ {
label: '状态', label: '状态',
prop: 'state', prop: 'state',
...@@ -157,20 +159,26 @@ export default { ...@@ -157,20 +159,26 @@ export default {
] ]
} else { } else {
return [ return [
{ label: '序号', type: 'index', width: '80px' }, {label: '序号', type: 'index', width: '80px'},
{ label: '项目编码', prop: 'prjCode' }, {label: '项目编码', prop: 'prjCode'},
{ label: '项目名称', prop: 'prjName' }, {label: '项目名称', prop: 'prjName'},
{ label: '承建单位', prop: 'buildOrg' }, {
{ label: '督查编码', prop: 'supervId' }, label: '承建单位',
prop: 'buildOrg',
options: this.sysBuildOrgOptions,
collectionType: true,
width: '300px',
},
{label: '督查编码', prop: 'supervId'},
{ {
label: '督查方案名称', label: '督查方案名称',
prop: 'supervName', prop: 'supervName',
__slotName: 'supervName', __slotName: 'supervName',
}, },
// { label: '指标清单', prop: 'zhibiaoqingdan', __slotName: 'zhibiaoqingdan'}, // { label: '指标清单', prop: 'zhibiaoqingdan', __slotName: 'zhibiaoqingdan'},
{ label: '项目评分', prop: 'prjScore' }, {label: '项目评分', prop: 'prjScore'},
{ label: '评审意见', prop: 'opinion' }, {label: '评审意见', prop: 'opinion'},
{ label: '评审时间', prop: 'opinionTime' }, {label: '评审时间', prop: 'opinionTime'},
{ {
label: '状态', label: '状态',
prop: 'state', prop: 'state',
...@@ -222,8 +230,8 @@ export default { ...@@ -222,8 +230,8 @@ export default {
rowData: {}, rowData: {},
activeName: '1', activeName: '1',
tabOptions: [ tabOptions: [
{ label: '督查指标模型管理', name: '1' }, {label: '督查指标模型管理', name: '1'},
{ label: '架构督查分析', name: '2' }, {label: '架构督查分析', name: '2'},
], ],
visible: false, visible: false,
dialogTitle: '', dialogTitle: '',
...@@ -231,9 +239,18 @@ export default { ...@@ -231,9 +239,18 @@ export default {
rowData: {}, rowData: {},
detailPrjCode: '', detailPrjCode: '',
visibleDetail: false, visibleDetail: false,
sysBuildOrgOptions: [],
} }
}, },
created() {
this.getDicts()
},
methods: { methods: {
getDicts() {
getDictTypeOptions('build_company').then((res) => {
this.sysBuildOrgOptions = res
})
},
querySearch(data = true) { querySearch(data = true) {
this.query.queryParam = { this.query.queryParam = {
...this.query.queryParam, ...this.query.queryParam,
...@@ -269,30 +286,31 @@ export default { ...@@ -269,30 +286,31 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
if (this.activeName == '1') { if (this.activeName == '1') {
this.$postRequest('/supervIndex/fb', { this.$postRequest('/supervIndex/fb', {
supervCode: row.supervCode, supervCode: row.supervCode,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('发布成功') this.$message.success('发布成功')
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
} else { } else {
this.$postRequest('/supervAnalysis/fb', { ...row }).then((res) => { this.$postRequest('/supervAnalysis/fb', {...row}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('发布成功') this.$message.success('发布成功')
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
} }
}) })
.catch(() => {}) .catch(() => {
})
}, },
fnDel(row) { fnDel(row) {
this.$confirm('是否确认删除?', '提示', { this.$confirm('是否确认删除?', '提示', {
...@@ -300,19 +318,20 @@ export default { ...@@ -300,19 +318,20 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
this.$postRequest('/supervIndex/del', { this.$postRequest('/supervIndex/del', {
supervCode: row.supervCode, id: row.id,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('删除成功') this.$message.success('删除成功')
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
})
})
.catch(() => {
}) })
})
.catch(() => {})
}, },
handleClick(tab, event) { handleClick(tab, event) {
if (tab.name == '1') { if (tab.name == '1') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!