Commit de1f8c48 by 史敦盼

概设关联业务管理,概设评审基础管理调试接口

1 parent b2fff42e
<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
* @Autor: pan
* @Date: 2024-03-21 20:58:31
* @LastEditors: pan
* @LastEditTime: 2024-03-26 17:31:29
* @LastEditTime: 2024-03-27 10:50:41
-->
<template>
<div class="searchTable">
......@@ -33,6 +33,7 @@
icon="el-icon-document-add"
size="medium"
plain
@click="fnAdd()"
>新建</el-button
>
<el-button
......@@ -60,6 +61,21 @@
</table-config>
</template>
</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>
</template>
......@@ -67,16 +83,21 @@
import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue'
import AddOrg from './AddOrg.vue'
import AddMatter from './AddMatter.vue'
import { queryConceptualBaseManagement } from '@/api/interface'
import { editNeedInfo } from '@/api'
import { buildType, approvalStatusOptions } from '@/utils/dictionary'
import {
queryConceptualBaseManagement,
queryConceptualBaseOrg,
} from '@/api/interface'
import { updMatterInfo, updOrgInfo } from '@/api'
import { subjectType, collectState } from '@/utils/dictionary'
export default {
name: 'conceptualBaseManagement',
data() {
return {
query: {
url: queryConceptualBaseManagement,
url: queryConceptualBaseOrg,
method: 'post',
queryParam: {},
},
......@@ -86,13 +107,13 @@ export default {
{ label: '集成管理', name: '2' },
],
selectRows: {},
visible: false,
rowData: {},
dialogTitle: '',
approvalVisible: false,
orgVisible: false,
matterVisible: false,
}
},
components: { ListPage, SearchForm, TableConfig },
components: { ListPage, SearchForm, TableConfig, AddOrg, AddMatter },
computed: {
formOptions() {
let arr = []
......@@ -106,24 +127,26 @@ export default {
},
{
label: '主体类型', // label文字
prop: 'type', // 字段名
prop: 'subjectType', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
options: subjectType,
},
]
} else {
arr = [
{
label: '事项名称', // label文字
prop: 'orgName', // 字段名
prop: 'matterName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
{
label: '状态', // label文字
prop: 'type', // 字段名
prop: 'state', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
options: collectState,
},
]
}
......@@ -144,12 +167,14 @@ export default {
},
{
label: '主体类型',
prop: 'createTime',
prop: 'subjectType',
options: subjectType,
collectionType: true,
},
{
label: '上级单位',
// width: '120px',
prop: 'state2',
prop: 'lastOrgName',
},
]
} else {
......@@ -157,7 +182,7 @@ export default {
...arr,
{
label: '事项名称',
prop: 'orgName',
prop: 'matterName',
width: '200px',
},
{
......@@ -170,11 +195,13 @@ export default {
},
{
label: '事项描述',
prop: 'des',
prop: 'matterContent',
},
{
label: '状态',
prop: 'state',
options: collectState,
collectionType: true,
},
]
}
......@@ -205,26 +232,31 @@ export default {
},
],
callback: (row, title) => {
// this.fnOperation(row, title)
this.fnOperation(row, title)
},
},
]
return arr
},
getUpdApi() {
if (this.activeName === '1') {
return updOrgInfo
} else {
return updMatterInfo
}
},
},
mounted() {},
methods: {
fnAdd() {
this.dialogTitle = '新增需求'
this.rowData = {}
this.visible = true
},
// 处理所需材料名称显示
handleFileName(scope) {
const filesValue = JSON.parse(scope.row.filesValue)
if (!filesValue) return
const str = filesValue.map((v) => v.name)
return str.join(',')
if (this.activeName === '1') {
this.dialogTitle = '新增组织机构'
this.orgVisible = true
} else {
this.dialogTitle = '新增事项'
this.matterVisible = true
}
},
// 表格勾选的数据
selectionChange(data) {
......@@ -238,7 +270,11 @@ export default {
this.$refs.searchTable.queryData()
},
handleClick(tab, event) {
// console.log(tab, event)
if (this.activeName === '1') {
this.query.url = queryConceptualBaseOrg
} else {
this.query.url = queryConceptualBaseManagement
}
},
/**
* @description: 操作按钮
......@@ -254,73 +290,19 @@ export default {
case '删除':
this.fnDel(row)
break
case '提交':
this.fnSubmit(row)
break
case '审批':
this.fnApproval(row)
break
case '发布':
this.fnRelease(row)
break
default:
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) {
this.dialogTitle = '修改需求'
this.rowData = row
this.visible = true
if (this.activeName === '1') {
this.dialogTitle = '修改组织机构'
this.orgVisible = true
} else {
this.dialogTitle = '修改事项'
this.matterVisible = true
}
},
fnDel(row) {
this.$confirm('是否确认删除?', '提示', {
......@@ -331,10 +313,9 @@ export default {
.then(() => {
const params = {
...row,
filesValue: JSON.parse(row.filesValue),
delFlag: 1,
}
editNeedInfo(params).then((res) => {
this.getUpdApi(params).then((res) => {
if (res.code === 200) {
this.$message.success('删除成功')
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
* @Autor: pan
* @Date: 2024-03-21 20:58:31
* @LastEditors: pan
* @LastEditTime: 2024-03-25 14:16:37
* @LastEditTime: 2024-03-27 11:25:47
-->
<template>
<div class="searchTable">
......@@ -48,17 +48,6 @@
<template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" />
</template>
<!-- 中部操作按钮 -->
<!-- <template #operationWrap>
<el-button
v-if="activeName === '2'"
icon="el-icon-document-add"
type="primary"
size="medium"
plain
>同步更新</el-button
>
</template> -->
<!-- 表格插槽 -->
<template #tableWrap>
<table-config
......@@ -77,17 +66,14 @@
</template>
<script>
// import { getWordImg } from '@/api/index'
import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue'
import { queryQyNeedReviewCount, queryArcAstSys } from '@/api/interface'
import { exportRiskReport } from '@/api/index'
import { archiPrjReviewEnum, buildType } from '@/utils/dictionary'
// import { str } from './base64'
import { systemArchiSaveFactor } from '@/api/index'
export default {
name: 'conceptualReview',
name: 'conceptualRelated',
data() {
return {
src: '',
......@@ -124,6 +110,7 @@ export default {
'ARCHI_TECHNOLOGY',
'ARCHI_SAFE',
],
elementTree: [],
}
},
components: {
......@@ -210,7 +197,9 @@ export default {
icon: 'el-icon-edit',
},
],
callback: (row, title) => {},
callback: (row, title) => {
this.fnOperation(row)
},
},
]
}
......@@ -218,39 +207,32 @@ export default {
return arr
},
},
mounted() {},
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) {
const item = scope.row
if (item.reviewPassCount && item.needCount) {
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) {
this.selectRows = data
......@@ -262,7 +244,6 @@ export default {
}
this.$refs.searchTable.queryData()
},
getArchiType() {},
handleClick(tab, event) {
if (this.activeName === '2') {
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!