Commit fc9db377 authored by “yiyousong”'s avatar “yiyousong”

pref:修改新增事项基础信息

parent 9f8ad81c
......@@ -32,10 +32,11 @@ export default {
<style lang="less" scoped>
.synopsis {
height: 100%;
height: auto;
width: 100%;
padding: 0px 10px;
}
/deep/.ant-tabs-nav-container {
border-bottom: 1px solid #f0f0f0 !important;
}
......
......@@ -64,15 +64,19 @@
<a-col :span="8">
<a-form-model-item label="是否收费" prop="isChargesShow">
<a-radio-group v-model="baseform.isChargesShow">
<a-radio value="是"></a-radio>
<a-radio value="否"></a-radio>
<a-radio
:value="key"
v-for="(v, key) in matterDict.isChargesShow"
:key="v"
>{{ v }}</a-radio
>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="法定办结时限:" props="isTimely">
<a-form-model-item label="法定办结时限" props="legalTimeLimitShow">
<a-input-group compact>
<a-select
style="width: 30%"
......@@ -85,15 +89,15 @@
<a-input-number
v-model="baseform.legalTimeLimitShow"
:disabled="isTimely !== '2'"
placeholder="请输入工作日数"
:min="0"
placeholder="请输入工作日数"
:min="1"
style="width: 70%"
/>
</a-input-group>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="承诺办结时限:" props="isPromise">
<a-form-model-item label="承诺办结时限" props="promiseTimeLimitShow">
<a-input-group compact>
<a-select
style="width: 30%"
......@@ -106,8 +110,8 @@
<a-input-number
v-model="baseform.promiseTimeLimitShow"
:disabled="isPromise !== '2'"
placeholder="请输入工作日数"
:min="0"
placeholder="请输入工作日数"
:min="1"
style="width: 70%"
/>
</a-input-group>
......@@ -115,16 +119,19 @@
</a-col>
<a-col :span="8">
<a-form-model-item
label="认证等级需求"
label="认证等级需求"
prop="certificationLevelsShow"
>
<a-select
v-model="baseform.certificationLevelsShow"
placeholder="请选择认证等级需求"
>
<a-select-option v-for="v in certification" :key="v" :value="v">{{
v
}}</a-select-option>
<a-select-option
v-for="(v, key) in matterDict.certificationLevelsShow"
:key="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
......@@ -159,9 +166,9 @@
placeholder="请选择网办类型"
>
<a-select-option
v-for="v in onlineTypeItem"
v-for="(v, key) in matterDict.onlineType"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
......@@ -189,16 +196,16 @@
placeholder="请选择事项类型"
>
<a-select-option
v-for="v in matterDict.eventTypeShow"
v-for="(v, key) in matterDict.eventTypeShow"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="联办机构" props="isLinked">
<a-form-model-item label="联办机构" props="jointInfoShow">
<a-input-group compact>
<a-select
style="width: 30%"
......@@ -215,9 +222,9 @@
style="width: 70%"
>
<a-select-option
v-for="v in jointInfoShowItem"
v-for="{ v, key } in matterDict.jointInfoShowItem"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
......@@ -233,9 +240,9 @@
placeholder="请选择行使层级"
>
<a-select-option
v-for="v in matterDict.performHierarchyShow"
v-for="(v, key) in matterDict.performHierarchyShow"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
......@@ -245,9 +252,9 @@
<a-form-model-item label="主题类型" prop="type">
<a-select v-model="baseform.type" placeholder="请选择主题类型">
<a-select-option
v-for="v in matterDict.type"
v-for="(v, key) in matterDict.type"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
......@@ -305,7 +312,11 @@
import { mapGetters } from "vuex";
import local from "@/utils/local";
import { getDeptList } from "@/services/dept";
import { saveAddMatter, addMatterToSite } from "@/services/matter";
import {
saveAddMatter,
addMatterToSite,
getMatterInfo,
} from "@/services/matter";
export default {
data() {
return {
......@@ -362,7 +373,28 @@ export default {
computed: {
...mapGetters("site", ["matterDict"]),
},
watch: {
isTimely(newVal) {
if (newVal === "1" || newVal === undefined) {
this.baseform.legalTimeLimitShow = "";
}
},
isPromise(newVal) {
if (newVal === "1" || newVal === undefined) {
this.baseform.promiseTimeLimitShow = "";
}
},
isLinked(newVal) {
if (newVal === "1" || newVal === undefined) {
this.baseform.jointInfoShow = undefined;
}
},
},
created() {
if (this.$route.query.edit == 1) {
let matterId = this.$route.query.matterId;
this.getMatterInfo(matterId);
}
console.log(this.matterDict);
this.getDeptListData();
},
......@@ -375,6 +407,14 @@ export default {
this.deptData = data.data;
}
},
// 编辑时获取信息
async getMatterInfo(id) {
let res = await getMatterInfo({ id });
if (res.data.code === 1) {
this.baseform = res.data.data;
}
},
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
......@@ -391,13 +431,35 @@ export default {
siteId: this.siteId,
matterIds: data.entity.id + "",
});
this.handleReset();
this.baseform = data.entity;
}
} else {
this.$message.warning("请完善表单");
}
});
},
// 重置
handleReset() {
this.$refs.form.resetFields();
let _this = this;
this.$confirm({
title: "系统提示",
content: "该操作会重置整个页面信息,确定要重置吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
onOk() {
_this.isTimely = undefined; // 是否及时办理
_this.isPromise = undefined; // 承诺是否及时办理
_this.isLinked = undefined; // 是否有联办机构
_this.$refs.form.resetFields();
},
onCancel() {
console.log("Cancel");
},
});
},
// 完善更多
checkMore() {
......@@ -413,6 +475,11 @@ export default {
</script>
<style lang="less" scoped>
.addsynopsis {
width: 100%;
height: 100%;
}
.more {
cursor: pointer;
}
......
......@@ -11,6 +11,8 @@ export default {};
<style lang="less" scoped>
.business-matter {
width: 100%;
height: 100%;
min-height: 100%;
background-color: #fff;
display: flex;
}
</style>
\ No newline at end of file
......@@ -90,12 +90,21 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>移除</a
>
<a-space>
<a
href="javascript:;"
v-if="text.source == 1"
class="edit"
@click="handleEdit(text.matterId)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>移除</a
>
</a-space>
</template>
</a-table>
</div>
......@@ -103,7 +112,7 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">一体化事项列表</h3>
<h3 class="titel">基础事项列表</h3>
<div class="control">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
......@@ -170,6 +179,13 @@
<a href="javascript:;" class="jion" @click="handleIn(text.id)"
>加入</a
>
<a
href="javascript:;"
v-if="text.source == 1"
class="edit"
@click="handleEdit(text.id)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
......@@ -254,7 +270,7 @@ const rightColumns = [
},
{
title: "操作",
width: "110px",
width: "130px",
scopedSlots: {
customRender: "action",
},
......@@ -326,15 +342,17 @@ export default {
matterName: this.searchRightVal,
...search,
});
let { pageInfo, data, dict } = res.data.data;
if (!data.length && this.rightCurrent > 1) {
this.rightCurrent -= 1;
this.getMatterListData();
if (res.data.code === 1) {
let { pageInfo, data, dict } = res.data.data;
if (!data.length && this.rightCurrent > 1) {
this.rightCurrent -= 1;
this.getMatterListData();
}
this.matterDataList = data;
this.rightTotal = pageInfo.totalResult;
this.SET_matterDict(dict);
this.rightLoading = false;
}
this.matterDataList = data;
this.rightTotal = pageInfo.totalResult;
this.SET_matterDict(dict);
this.rightLoading = false;
},
// 左边搜索
onSearchLeft() {
......@@ -371,7 +389,12 @@ export default {
},
//新增事项
addMatter() {
this.$router.push("/business/synopsis");
this.$router.push({
path: "/business/synopsis",
query: {
edit: 0,
},
});
},
onSelectChange(key, data) {
this.deleteData = data;
......@@ -515,6 +538,16 @@ export default {
}
}
},
// 编辑
handleEdit(matterId) {
this.$router.push({
path: "/business/synopsis",
query: {
edit: 1,
matterId,
},
});
},
},
};
</script>
......
......@@ -578,6 +578,7 @@ export default {
},
//重置
resetForm() {
this.fileList = [];
this.$refs.ruleForm.resetFields();
},
// 关闭对话框
......
......@@ -52,6 +52,11 @@ export async function delMatter(data) {
export async function getMatterListSubList(data) {
return request(matter.matterList, METHOD.POST, data);
}
// 查看基础事项
export async function getMatterInfo(data) {
return request(matter.info, METHOD.GET, data);
}
/**
* 事项申请材料
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment