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

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

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