@@ -685,22 +686,7 @@ export default {
boxHeight:true,
serviceOptions: [
- {
- label: "志愿者",
- value: "volunteer",
- },
- // {
- // label: '社会组织',
- // value: 'social_org'
- // },
- {
- label: "社区自组织",
- value: "community_org",
- },
- {
- label: "区域党建单位",
- value: "party_unit",
- },
+
],
serviceOptiondList: [],
options: [
@@ -757,7 +743,7 @@ export default {
},
{
label: "需求类型",
- columnName: "categoryName",
+ columnName: "categoryAllName",
align: "center",
width: "",
options: [],
@@ -815,7 +801,7 @@ export default {
options: [],
},
{
- label: "服务方",
+ label: "服务组织",
columnName: "serviceShowName",
align: "center",
width: "120",
@@ -894,7 +880,7 @@ export default {
{ required: true, message: "服务时间不能为空", trigger: "blur" },
],
serviceType: [
- { required: true, message: "服务方不能为空", trigger: "blur" },
+ { required: true, message: "服务组织不能为空", trigger: "blur" },
],
serviceStartTime: [
{ required: true, message: "实际服务时间不能为空", trigger: "blur" },
@@ -982,10 +968,8 @@ export default {
handleCateSlect(val) {
console.log("val", val);
if (val.length === 1) {
- this.demandOptions.forEach((item) => {
- if (item.value == val[0]) this.form.parentCode = item.pvalue;
- });
- this.form.categoryCode = val[0];
+ this.form.parentCode = val[0];
+ this.form.categoryCode = '';
} else {
this.form.parentCode = val[0];
this.form.categoryCode = val[1];
@@ -1078,10 +1062,7 @@ export default {
}
if (addType == "edit") {
await this.getDemandUserList();
- this.demandOptions.forEach((item) => {
- if (item.value === row.categoryCode)
- this.form.categoryCode = [row.categoryCode];
- });
+ this.form.categoryCode = [row.parentCode,row.categoryCode];
this.demandUserList.forEach((item) => {
if (item.demandUserId == row.demandUserId)
this.selectDemandUser = item.label;
@@ -1092,7 +1073,6 @@ export default {
},
async handleLook(row, type) {
this.detailShow = true;
- console.log("row", row);
this.$nextTick(() => {
this.$refs.ref_form_detail.initForm(row);
});
@@ -1197,16 +1177,8 @@ export default {
async editCate() {
const categoryCode = this.form.categoryCode;
if (Array.isArray(categoryCode)) {
- if (categoryCode.length === 1) {
- this.demandOptions.forEach((item) => {
- if (item.value == categoryCode[0])
- this.form.parentCode = item.pvalue;
- });
- this.form.categoryCode = categoryCode[0];
- } else {
this.form.parentCode = categoryCode[0];
- this.form.categoryCode = categoryCode[1];
- }
+ this.form.categoryCode = categoryCode[1]? categoryCode[1]:'';
}
const _form = {
@@ -1267,10 +1239,10 @@ export default {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
- if (item.children) {
- if (item.children.length === 0)
- _item = { ...item, children: undefined };
- else _item = { ...item, children: this.getTreeData(item.children) };
+ if (item.childCateList) {
+ if (item.childCateList.length === 0)
+ _item = { ...item, childCateList: undefined };
+ else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
} else {
_item = { ...item };
}
@@ -1282,8 +1254,8 @@ export default {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
- if (item.children)
- return { ...item, children: this.getFlagData(item.children, flag) };
+ if (item.childCateList)
+ return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
else return item;
});
// console.log('arrr-oppp', arr2)
@@ -1337,7 +1309,7 @@ export default {
async getDemandOptions() {
this.$http
- .post("/governance/icresidemanddict/demandoption")
+ .post("/actual/base/serviceitem/listAllCategory")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@@ -1411,7 +1383,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
- this.serviceOptions = res.data;
+ this.serviceOptions = res.data.filter(item=>item.value != 'fifteen_mins_places');
}
})
.catch(() => {
diff --git a/src/views/modules/communityService/measure/info.vue b/src/views/modules/communityService/measure/info.vue
index 206fb297e..1f668df57 100644
--- a/src/views/modules/communityService/measure/info.vue
+++ b/src/views/modules/communityService/measure/info.vue
@@ -267,7 +267,7 @@
(addType == 'look' && form.serviceShowFlag)
"
:class="{ 'form-item': source === 'visiual' }"
- label="服务方"
+ label="服务组织"
prop="serviceType"
>
diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue
index 0bd011feb..a3d9b5d38 100644
--- a/src/views/modules/communityService/policy/addPolicy.vue
+++ b/src/views/modules/communityService/policy/addPolicy.vue
@@ -10,45 +10,18 @@
class="div_form"
>
-
-
-
-
-
- -
-
+
-
-
-
-
-
+ size="small"
+ class="u-item-width-normal"
+ @change="handelChangeCategoryCode"
+ >
+
@@ -315,7 +288,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'标签配置'"
- width="900px"
+ width="954px"
top="5vh"
class="dialog-h"
@closed="showLabelForm = false"
@@ -372,8 +345,7 @@ export default {
policyLevelArray: [],
// 公共服务分类
- serviceTypesLevel1: [],
- serviceTypesLevel2: [],
+
iscascaderShow: 0,
btnDisable: false,
@@ -390,8 +362,8 @@ export default {
},
formData: {
- policyCategoryL1: "", // 公共服务(政策级别)一级分类id
- policyCategoryL2: "",
+ categoryCode: [],
+ parentCategoryCode: "",
policyLevel: "", //政府级别
startDate: "", //起始时间yyyy-MM-dd
endDate: "", //截止时间yyyy-MM-dd
@@ -423,7 +395,7 @@ export default {
},
newDataRule: {
serverOrgId: [
- { required: true, message: "服务方不能为空", trigger: "bulr" },
+ { required: true, message: "服务组织不能为空", trigger: "bulr" },
],
serviceScopeList: [
{ required: true, message: "服务范围不能为空", trigger: "bulr" },
@@ -446,6 +418,9 @@ export default {
newArr: [],
sarr: [],
casOptions: [],
+
+ serviceOptions:[],
+ originalServiceOptions:[]
};
},
@@ -464,12 +439,11 @@ export default {
await this.getDictOptions();
await this.loadScopeTree();
await this.loadDemandoption();
-
+ await this.getDemandOptions();
if (this.formType === "add") {
this.$refs.ref_form.resetFields();
} else {
await this.loadFormInfo();
- await this.getCommonServiceTypeSelectList();
await this.getServiceuserList();
}
@@ -477,17 +451,7 @@ export default {
},
methods: {
- // addRule () {
- // let obj = {
- // name: '',
- // detail: []
- // }
-
- // this.formData.ruleList.push(obj)
- // },
- // delRule (index) {
- // this.formData.ruleList.splice(index, 1);
- // },
+
// 获取服务范围树
async loadScopeTree() {
const url = "/gov/org/icServiceProject/service/serviceScopeTree";
@@ -522,6 +486,11 @@ export default {
// this.formData.ruleList = data.ruleList
data.policyLevel = "" + data.policyLevel;
this.formData = data;
+ if (data.categoryCode) {
+ this.formData.categoryCode = [data.parentCategoryCode, data.categoryCode];
+ } else {
+ this.formData.categoryCode = [data.parentCategoryCode];
+ }
this.newFormData = data.assignInfo;
if (data.assignInfo) {
for (let i in data.assignInfo.serviceScopeList) {
@@ -556,9 +525,29 @@ export default {
this.$message.error(msg);
}
},
+ handelChangeCategoryCode() {
+ this.serviceOptions = [...this.originalServiceOptions];
+ const parentMappings = {
+ '公益事业类': ['party_unit', 'community_org'],
+ '技能培训类': ['party_unit', 'community_org', 'publicWelfare'],
+ '教育讲座类': ['party_unit', 'community_org'],
+ '社会治理类': ['party_unit', 'community_org'],
+ '公共服务类': ['party_unit', 'community_org', 'publicWelfare'],
+ '设施维护类': ['party_unit', 'community_org', 'publicWelfare'],
+ '岗位提供类': ['party_unit', 'community_org'],
+ };
+ const checkedParent = this.$refs['categoryCode'].getCheckedNodes()[0].parent.label;
+ if (parentMappings[checkedParent] && Array.isArray(parentMappings[checkedParent])) {
+ this.serviceOptions = this.serviceOptions.filter(item => parentMappings[checkedParent].includes(item.value));
+ } else {
+ this.serviceOptions = this.originalServiceOptions
+ }
+ console.log(this.serviceOptions);
+ },
//点击标签触发事件
handleClickLabel() {
this.showLabelForm = true;
+ this.$refs['ref_form'].clearValidate('resiSearchTagId')
this.$nextTick(() => {
this.$refs["ref_label_form"].initForm("info");
});
@@ -601,15 +590,15 @@ export default {
},
async getServiceuserList() {
if (!this.formData.assignFlag) return;
- if (this.formData.commonServiceTypeId == "") {
+ if (this.formData.categoryCode.length==0) {
this.$message.error("请先选择需求类别!");
return;
}
- const url = "/actual/base/serviceitem/listServerOrg";
+ const url = "/actual/base/serviceitem/listServerOrgNewTask";
let params = {
- serviceTypeId: this.formData.policyCategoryL2,
+ serverOrgCategoryCode: this.formData.categoryCode[1],
+ serverParentOrgCategoryCode:this.formData.categoryCode[0],
serverOrgType: this.newFormData.serverOrgType ||this.formData.assignInfo.serverOrgType,
- businessType: "common_service",
};
console.log(this.formData);
let { data, code, msg } = await requestPost(url, params);
@@ -629,6 +618,8 @@ export default {
return this.$message.error(res.msg);
} else {
this.serviceOptions = res.data;
+ this.originalServiceOptions = [...this.serviceOptions];
+
}
})
.catch(() => {
@@ -636,7 +627,6 @@ export default {
});
},
getDictOptions() {
- // 政策级别下拉
this.$http
.post("/sys/dict/data/dictlist", {
dictType: "policy_level",
@@ -652,19 +642,7 @@ export default {
return this.$message.error("网络错误");
});
- // 政策分类下拉(其实是获取的共性服务分类)
- this.$http
- .get("/governance/commonServiceType/selectList/0")
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- } else {
- this.serviceTypesLevel1 = res.data;
- }
- })
- .catch(() => {
- return this.$message.error("网络错误");
- });
+
},
// 获取服务范围树
@@ -687,22 +665,6 @@ export default {
);
},
- // handleCateSlect(val) {
- // console.log("val", val);
- // let arr = [];
- // val.forEach((item) => {
- // let obj = {
- // codePath: item.join(","),
- // categoryCode: item[item.length - 1],
- // };
-
- // arr.push(obj);
- // });
-
- // console.log("arr", arr);
- // this.formData.categoryList = arr;
- // },
-
async handleAdd() {
// var oDate1 = new Date(this.formData.startDate);
// var oDate2 = new Date(this.formData.endDate);
@@ -792,6 +754,7 @@ export default {
},
async addFuwu() {
// 处理服务范围数据
+ this.startLoading()
await this.operationOption();
this.formData.attachmentList = [...this.fileList]
let arr = []
@@ -814,7 +777,7 @@ export default {
url = "/governance/policy/updatePolicy";
this.formData.policyId = this.policyId;
}
- //为什么不能传null还要返回null呢?
+
if (this.formType == "copy" && this.formData.assignFlag == 0) {
this.formData.assignInfo = {
noticeApproches: [],
@@ -828,13 +791,20 @@ export default {
}
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate'
let params = {
- ...this.formData,
+ categoryCode:this.formData.categoryCode[1]?this.formData.categoryCode[1]:'',
+ parentCategoryCode:this.formData.categoryCode[0],
+ policyLevel:this.formData.policyLevel,
+ startDate:this.formData.startDate,
+ endDate:this.formData.endDate,
+ title:this.formData.title,
+ content:this.formData.content,
+ attachmentList:this.formData.attachmentList,
+ assignFlag:this.formData.assignFlag,
+ assignInfo:this.formData.assignInfo,
+ resiSearchTagId:this.formData.resiSearchTagId,
+ policyId:this.formData.policyId
};
- delete params.policyCategoryL1;
- delete params.resiSearchTagName;
- console.log(params);
const { data, code, msg } = await requestPost(url, params);
-
if (code === 0) {
this.$message.success("操作成功");
this.resetData();
@@ -843,16 +813,45 @@ export default {
this.btnDisable = false;
this.$message.error(msg);
}
+ this.endLoading()
},
-
+ async getDemandOptions() {
+ this.$http
+ .post("/actual/base/serviceitem/listAllCategory")
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ this.demandOptions = this.getFlagDatas(
+ this.getTreeData(res.data),
+ "usableFlag"
+ );
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
+ },
+ getFlagDatas(data, flag) {
+ if (!Array.isArray(data)) return [];
+ let arr1 = data.filter((item) => item[flag]);
+ let arr2 = arr1.map((item) => {
+ if (item.childCateList)
+ return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
+ else return item;
+ });
+ // console.log('arrr-oppp', arr2)
+ return arr2;
+ },
+
getTreeData(data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
- if (item.children) {
- if (item.children.length === 0)
- _item = { ...item, children: undefined };
- else _item = { ...item, children: this.getTreeData(item.children) };
+ if (item.childCateList) {
+ if (item.childCateList.length === 0)
+ _item = { ...item, childCateList: undefined };
+ else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
} else {
_item = { ...item };
}
@@ -964,14 +963,18 @@ export default {
resetData() {
this.formData = {
- serviceTypeLevel1Id: "",
- serviceTypeLevel2Id: "",
+ categoryCode: [],
+ parentCategoryCode: "",
policyLevel: "", //政府级别
startDate: "", //起始时间yyyy-MM-dd
endDate: "", //截止时间yyyy-MM-dd
title: "", //
content: "", //
attachmentList: [],
+ resiSearchTagName: "", //符合政策人员标签
+ assignFlag: 0, //是否指派服务
+ resiSearchTagId: "", //符合政策人员id
+ assignInfo: {},
};
},
// 开启加载动画
@@ -991,32 +994,12 @@ export default {
},
// 服务类型下拉框选中事件
- handleChangeServiceTypeLevel1() {
- this.formData.policyCategoryL2 = "";
- this.getCommonServiceTypeSelectList()
- },
- getCommonServiceTypeSelectList(){
- this.$http
- .get(
- "/governance/commonServiceType/selectList/" +
- this.formData.policyCategoryL1
- )
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- } else {
- this.serviceTypesLevel2 = res.data;
- }
- })
- .catch(() => {
- return this.$message.error("网络错误");
- });
- },
+
},
computed: {
dataRule() {
return {
- policyCategoryL2: [
+ categoryCode: [
{ required: true, message: "政策类型不能为空", trigger: "blur" },
],
policyLevel: [
diff --git a/src/views/modules/communityService/wennuanzhaoren/addForm.vue b/src/views/modules/communityService/wennuanzhaoren/addForm.vue
index 9c90d611a..5c32453c6 100644
--- a/src/views/modules/communityService/wennuanzhaoren/addForm.vue
+++ b/src/views/modules/communityService/wennuanzhaoren/addForm.vue
@@ -12,44 +12,16 @@
:rules="dataRule"
class="div_form"
>
-
-
- -
-
-
+ size="small"
+ class="u-item-width-normal"
+ >
+
-
+
@@ -131,8 +131,8 @@ function iniFmData() {
return {
gridId: "", //所属网格
reportUserId: "", // 上报人ID
- name: "cc", // 上报人姓名
- mobile: "17637255555", // 联系电话
+ name: "", // 上报人姓名
+ mobile: "", // 联系电话
idCard: "", // 证件号
sourceType: "", // 反映渠道
happenTime: "", //上报时间
@@ -383,7 +383,6 @@ export default {
});
return false;
}
-
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //证件号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
if (
this.formData.idCard &&
diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue
index c2fab3dc1..f813b1105 100644
--- a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue
+++ b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue
@@ -243,7 +243,7 @@