Commit 6798a6f8 by 史敦盼

Merge branch 'sdp-v1'

2 parents eb15729b de1f8c48
<template>
<el-dialog
:title="title"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="50%"
@close="handleClose()"
@open="handleOpen"
>
<div>
<Form
ref="addForm"
:form-options="formOptions"
label-width="120px"
></Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">取 消</el-button>
<el-button type="primary" @click="handleSubmit()" size="mini"
>提 交</el-button
>
</span></el-dialog
>
</template>
<script>
import Form from '@/components/Form.vue'
import { addMatterInfo, updMatterInfo } from '@/api'
export default {
props: {
title: {
type: String,
default: '',
},
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
},
data() {
return {}
},
components: {
Form,
},
computed: {
formOptions() {
return [
{
label: '事项名称', // label文字
prop: 'matterName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '创建人', // label文字
prop: 'createMan', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
readonly: true,
},
{
label: '创建时间', // label文字
prop: 'createTime', // 字段名
type: 'date',
valueFormat: 'yyyy-MM-dd',
element: 'el-date-picker', // 指定elementui组件
initValue: new Date().format('yyyy-MM-dd'), // 字段初始值
placeholder: '请选择', // elementui组件属性
},
{
label: '事件描述', // label文字
prop: 'matterContent', // 字段名
type: 'textarea',
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
span: 24,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '备注', // label文字
prop: 'remark', // 字段名
type: 'textarea',
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
span: 24,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
]
},
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
isEdit() {
if (this.title === '修改事项') {
return true
} else {
return false
}
},
},
mounted() {},
methods: {
handleSubmit() {
this.$refs['addForm'].onValidate(() => {
const loading = this.$loading({
lock: true,
text: '保存中',
spinner: 'el-icon-loading',
})
const formInfo = this.$refs['addForm'].getData()
const typeApi = this.isEdit ? updMatterInfo : addMatterInfo
const params = {
...this.rowData,
...formInfo,
state: 2,
}
typeApi(params).then((res) => {
if (res.code === 200) {
loading.close()
this.$message.success('保存成功')
this.showDialog = false
this.handleClose()
this.$emit('querySearch')
}
})
})
},
handleClose() {
this.showDialog = false
this.formOptions.forEach((v) => {
if (v.prop === 'createTime') {
v.initValue = new Date().format('yyyy-MM-dd')
} else {
v.initValue = ''
}
})
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
},
handleOpen() {
if (Object.keys(this.rowData).length) {
this.formOptions.forEach((v) => {
v.initValue = this.rowData[v.prop]
})
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
})
} else {
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
})
}
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
</style>
<template>
<el-dialog
:title="title"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="50%"
@close="handleClose()"
@open="handleOpen"
>
<div>
<Form
ref="addForm"
:form-options="formOptions"
label-width="120px"
></Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">取 消</el-button>
<el-button type="primary" @click="handleSubmit()" size="mini"
>提 交</el-button
>
</span></el-dialog
>
</template>
<script>
import Form from '@/components/Form.vue'
import { addOrgInfo, updOrgInfo } from '@/api'
import { subjectType } from '@/utils/dictionary'
export default {
name: 'add-org',
props: {
title: {
type: String,
default: '',
},
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
},
data() {
return {}
},
components: {
Form,
},
computed: {
formOptions() {
return [
{
label: '主体类型', // label文字
prop: 'subjectType', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
options: subjectType,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '机构名称', // label文字
prop: 'orgName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '上级单位', // label文字
prop: 'lastOrgName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
disabled: true,
},
{
label: '备注', // label文字
prop: 'remark', // 字段名
type: 'textarea',
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
span: 24,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
]
},
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
isEdit() {
if (this.title === '修改组织机构') {
return true
} else {
return false
}
},
},
mounted() {},
methods: {
handleSubmit() {
this.$refs['addForm'].onValidate(() => {
const loading = this.$loading({
lock: true,
text: '保存中',
spinner: 'el-icon-loading',
})
const formInfo = this.$refs['addForm'].getData()
const typeApi = this.isEdit ? updOrgInfo : addOrgInfo
const params = {
...this.rowData,
...formInfo,
}
typeApi(params).then((res) => {
if (res.code === 200) {
loading.close()
this.$message.success('保存成功')
this.showDialog = false
this.handleClose()
this.$emit('querySearch')
}
})
})
},
handleClose() {
this.showDialog = false
this.formOptions.forEach((v) => {
v.initValue = ''
})
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
},
handleOpen() {
if (Object.keys(this.rowData).length) {
this.formOptions.forEach((v) => {
v.initValue = this.rowData[v.prop]
})
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
})
} else {
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
})
}
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
</style>
<!-- <!--
* @Description: 概设评审基础管理 integration-info-controller * @Description: 概设评审基础管理
* @Version: 2.0 * @Version: 2.0
* @Autor: pan * @Autor: pan
* @Date: 2024-03-21 20:58:31 * @Date: 2024-03-21 20:58:31
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-26 17:31:29 * @LastEditTime: 2024-03-27 10:50:41
--> -->
<template> <template>
<div class="searchTable"> <div class="searchTable">
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
icon="el-icon-document-add" icon="el-icon-document-add"
size="medium" size="medium"
plain plain
@click="fnAdd()"
>新建</el-button >新建</el-button
> >
<el-button <el-button
...@@ -60,6 +61,21 @@ ...@@ -60,6 +61,21 @@
</table-config> </table-config>
</template> </template>
</list-page> </list-page>
<!-- 组织机构新增/编辑 -->
<AddOrg
:title="dialogTitle"
:row-data="rowData"
@querySearch="querySearch"
:visible.sync="orgVisible"
/>
<!-- 事项新增/编辑 -->
<AddMatter
:title="dialogTitle"
:row-data="rowData"
@querySearch="querySearch"
:visible.sync="matterVisible"
/>
</div> </div>
</template> </template>
...@@ -67,16 +83,21 @@ ...@@ -67,16 +83,21 @@
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 '@/components/TableConfig.vue' import TableConfig from '@/components/TableConfig.vue'
import AddOrg from './AddOrg.vue'
import AddMatter from './AddMatter.vue'
import { queryConceptualBaseManagement } from '@/api/interface' import {
import { editNeedInfo } from '@/api' queryConceptualBaseManagement,
import { buildType, approvalStatusOptions } from '@/utils/dictionary' queryConceptualBaseOrg,
} from '@/api/interface'
import { updMatterInfo, updOrgInfo } from '@/api'
import { subjectType, collectState } from '@/utils/dictionary'
export default { export default {
name: 'conceptualBaseManagement', name: 'conceptualBaseManagement',
data() { data() {
return { return {
query: { query: {
url: queryConceptualBaseManagement, url: queryConceptualBaseOrg,
method: 'post', method: 'post',
queryParam: {}, queryParam: {},
}, },
...@@ -86,13 +107,13 @@ export default { ...@@ -86,13 +107,13 @@ export default {
{ label: '集成管理', name: '2' }, { label: '集成管理', name: '2' },
], ],
selectRows: {}, selectRows: {},
visible: false,
rowData: {}, rowData: {},
dialogTitle: '', dialogTitle: '',
approvalVisible: false, orgVisible: false,
matterVisible: false,
} }
}, },
components: { ListPage, SearchForm, TableConfig }, components: { ListPage, SearchForm, TableConfig, AddOrg, AddMatter },
computed: { computed: {
formOptions() { formOptions() {
let arr = [] let arr = []
...@@ -106,24 +127,26 @@ export default { ...@@ -106,24 +127,26 @@ export default {
}, },
{ {
label: '主体类型', // label文字 label: '主体类型', // label文字
prop: 'type', // 字段名 prop: 'subjectType', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
options: subjectType,
}, },
] ]
} else { } else {
arr = [ arr = [
{ {
label: '事项名称', // label文字 label: '事项名称', // label文字
prop: 'orgName', // 字段名 prop: 'matterName', // 字段名
element: 'el-input', // 指定elementui组件 element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性 placeholder: '请输入内容', // elementui组件属性
}, },
{ {
label: '状态', // label文字 label: '状态', // label文字
prop: 'type', // 字段名 prop: 'state', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
options: collectState,
}, },
] ]
} }
...@@ -144,12 +167,14 @@ export default { ...@@ -144,12 +167,14 @@ export default {
}, },
{ {
label: '主体类型', label: '主体类型',
prop: 'createTime', prop: 'subjectType',
options: subjectType,
collectionType: true,
}, },
{ {
label: '上级单位', label: '上级单位',
// width: '120px', // width: '120px',
prop: 'state2', prop: 'lastOrgName',
}, },
] ]
} else { } else {
...@@ -157,7 +182,7 @@ export default { ...@@ -157,7 +182,7 @@ export default {
...arr, ...arr,
{ {
label: '事项名称', label: '事项名称',
prop: 'orgName', prop: 'matterName',
width: '200px', width: '200px',
}, },
{ {
...@@ -170,11 +195,13 @@ export default { ...@@ -170,11 +195,13 @@ export default {
}, },
{ {
label: '事项描述', label: '事项描述',
prop: 'des', prop: 'matterContent',
}, },
{ {
label: '状态', label: '状态',
prop: 'state', prop: 'state',
options: collectState,
collectionType: true,
}, },
] ]
} }
...@@ -205,26 +232,31 @@ export default { ...@@ -205,26 +232,31 @@ export default {
}, },
], ],
callback: (row, title) => { callback: (row, title) => {
// this.fnOperation(row, title) this.fnOperation(row, title)
}, },
}, },
] ]
return arr return arr
}, },
getUpdApi() {
if (this.activeName === '1') {
return updOrgInfo
} else {
return updMatterInfo
}
},
}, },
mounted() {}, mounted() {},
methods: { methods: {
fnAdd() { fnAdd() {
this.dialogTitle = '新增需求'
this.rowData = {} this.rowData = {}
this.visible = true if (this.activeName === '1') {
}, this.dialogTitle = '新增组织机构'
// 处理所需材料名称显示 this.orgVisible = true
handleFileName(scope) { } else {
const filesValue = JSON.parse(scope.row.filesValue) this.dialogTitle = '新增事项'
if (!filesValue) return this.matterVisible = true
const str = filesValue.map((v) => v.name) }
return str.join(',')
}, },
// 表格勾选的数据 // 表格勾选的数据
selectionChange(data) { selectionChange(data) {
...@@ -238,7 +270,11 @@ export default { ...@@ -238,7 +270,11 @@ export default {
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
}, },
handleClick(tab, event) { handleClick(tab, event) {
// console.log(tab, event) if (this.activeName === '1') {
this.query.url = queryConceptualBaseOrg
} else {
this.query.url = queryConceptualBaseManagement
}
}, },
/** /**
* @description: 操作按钮 * @description: 操作按钮
...@@ -254,73 +290,19 @@ export default { ...@@ -254,73 +290,19 @@ export default {
case '删除': case '删除':
this.fnDel(row) this.fnDel(row)
break break
case '提交':
this.fnSubmit(row)
break
case '审批':
this.fnApproval(row)
break
case '发布':
this.fnRelease(row)
break
default: default:
break break
} }
}, },
fnRelease(row) {
this.$confirm('是否确认发布?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
const params = {
...row,
state: 1,
filesValue: JSON.parse(row.filesValue),
}
editNeedInfo(params).then((res) => {
if (res.code === 200) {
this.$message.success('发布成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
},
fnApproval(row) {
this.rowData = row
this.approvalVisible = true
},
fnSubmit(row) {
this.$confirm('是否确认提交?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
const params = {
...row,
approveState: 2,
filesValue: JSON.parse(row.filesValue),
}
editNeedInfo(params).then((res) => {
if (res.code === 200) {
this.$message.success('提交成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
},
fnEdit(row) { fnEdit(row) {
this.dialogTitle = '修改需求'
this.rowData = row this.rowData = row
this.visible = true if (this.activeName === '1') {
this.dialogTitle = '修改组织机构'
this.orgVisible = true
} else {
this.dialogTitle = '修改事项'
this.matterVisible = true
}
}, },
fnDel(row) { fnDel(row) {
this.$confirm('是否确认删除?', '提示', { this.$confirm('是否确认删除?', '提示', {
...@@ -331,10 +313,9 @@ export default { ...@@ -331,10 +313,9 @@ export default {
.then(() => { .then(() => {
const params = { const params = {
...row, ...row,
filesValue: JSON.parse(row.filesValue),
delFlag: 1, delFlag: 1,
} }
editNeedInfo(params).then((res) => { this.getUpdApi(params).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('删除成功') this.$message.success('删除成功')
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
......
<!-- <!--
* @Description: tab1查/online-rev-wr/qyNeedReviewCount tab2系统架构资产 isExtend传0 同步更新调用继承接口isExtend传0 * @Description: 概设关联业务管理 tab1查/online-rev-wr/qyNeedReviewCount tab2系统架构资产 isExtend传0 同步更新调用继承接口isExtend传0
* @Version: 2.0 * @Version: 2.0
* @Autor: pan * @Autor: pan
* @Date: 2024-03-21 20:58:31 * @Date: 2024-03-21 20:58:31
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-25 14:16:37 * @LastEditTime: 2024-03-27 11:25:47
--> -->
<template> <template>
<div class="searchTable"> <div class="searchTable">
...@@ -48,17 +48,6 @@ ...@@ -48,17 +48,6 @@
<template #formWrap> <template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" /> <SearchForm @onSearch="querySearch" :form-options="formOptions" />
</template> </template>
<!-- 中部操作按钮 -->
<!-- <template #operationWrap>
<el-button
v-if="activeName === '2'"
icon="el-icon-document-add"
type="primary"
size="medium"
plain
>同步更新</el-button
>
</template> -->
<!-- 表格插槽 --> <!-- 表格插槽 -->
<template #tableWrap> <template #tableWrap>
<table-config <table-config
...@@ -77,17 +66,14 @@ ...@@ -77,17 +66,14 @@
</template> </template>
<script> <script>
// import { getWordImg } from '@/api/index'
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 '@/components/TableConfig.vue' import TableConfig from '@/components/TableConfig.vue'
import { queryQyNeedReviewCount, queryArcAstSys } from '@/api/interface' import { queryQyNeedReviewCount, queryArcAstSys } from '@/api/interface'
import { exportRiskReport } from '@/api/index' import { systemArchiSaveFactor } from '@/api/index'
import { archiPrjReviewEnum, buildType } from '@/utils/dictionary'
// import { str } from './base64'
export default { export default {
name: 'conceptualReview', name: 'conceptualRelated',
data() { data() {
return { return {
src: '', src: '',
...@@ -124,6 +110,7 @@ export default { ...@@ -124,6 +110,7 @@ export default {
'ARCHI_TECHNOLOGY', 'ARCHI_TECHNOLOGY',
'ARCHI_SAFE', 'ARCHI_SAFE',
], ],
elementTree: [],
} }
}, },
components: { components: {
...@@ -210,7 +197,9 @@ export default { ...@@ -210,7 +197,9 @@ export default {
icon: 'el-icon-edit', icon: 'el-icon-edit',
}, },
], ],
callback: (row, title) => {}, callback: (row, title) => {
this.fnOperation(row)
},
}, },
] ]
} }
...@@ -218,39 +207,32 @@ export default { ...@@ -218,39 +207,32 @@ export default {
return arr return arr
}, },
}, },
mounted() {},
methods: { methods: {
// 同步更新
fnOperation(row) {
// const extend = []
// extend.push({
// archiType: item.archiType,
// assetIdList: item.checkedCities
// })
const params = {
// extend,
isExtend: 0,
}
systemArchiSaveFactor(params).then((res) => {
if (res.code === 200) {
this.$message.success('同步更新成功')
} else {
this.$message.error(res.msg)
}
})
},
handlePercent(scope) { handlePercent(scope) {
const item = scope.row const item = scope.row
if (item.reviewPassCount && item.needCount) { if (item.reviewPassCount && item.needCount) {
return (item.reviewPassCount / item.needCount).toFixed(2) * 100 + '%' return (item.reviewPassCount / item.needCount).toFixed(2) * 100 + '%'
} }
}, },
// 材料解析
fnMaterialAnalysis() {
if (this.selectRows.length == 0) {
return this.$message.warning('请选择一条数据')
}
// xxx
},
// 导出重复建设风险报告
handlExportRiskReport() {
const params = {
title: '功能重复风险',
comment: '',
}
exportRiskReport(params).then((res) => {
const url = window.URL.createObjectURL(
new Blob([res], { type: 'application/octet-stream' }),
)
const link = document.createElement('a')
link.href = url
link.setAttribute('download', `重复建设风险报告.doc`)
document.body.appendChild(link)
link.click()
window.URL.revokeObjectURL(url) // 释放内存
})
},
// 表格勾选的数据 // 表格勾选的数据
selectionChange(data) { selectionChange(data) {
this.selectRows = data this.selectRows = data
...@@ -262,7 +244,6 @@ export default { ...@@ -262,7 +244,6 @@ export default {
} }
this.$refs.searchTable.queryData() this.$refs.searchTable.queryData()
}, },
getArchiType() {},
handleClick(tab, event) { handleClick(tab, event) {
if (this.activeName === '2') { if (this.activeName === '2') {
this.query.url = queryArcAstSys this.query.url = queryArcAstSys
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!