城阳pc工作端前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1047 lines
31 KiB

3 years ago
<template>
3 years ago
<div>
3 years ago
<el-card :class="{ 'box-card': source === 'visiual' }">
<el-form
label-width="120px"
:model="form"
class="div_form"
:rules="rules"
ref="ruleForm"
>
<el-form-item
v-if="formType !== 'add'"
label="操作方式"
:class="{ 'form-item': source === 'visiual' }"
prop="addType"
>
3 years ago
<el-radio-group v-model="addType">
<el-radio label="look">查看</el-radio>
<template v-if="form.reportType != 'self_help'">
3 years ago
<el-radio label="edit" v-if="form.status === 'pending'"
>修改</el-radio
>
<el-radio
label="cancel"
v-if="form.status !== 'finished' && form.status !== 'canceled'"
>取消</el-radio
>
3 years ago
</template>
3 years ago
<el-radio
label="appoint"
v-if="form.status === 'pending' || form.status === 'assigned'"
>指派</el-radio
>
3 years ago
<!-- <el-radio label="finish"
3 years ago
v-if="
3 years ago
(form.reportType == 'self_help' &&
form.serviceShowFlag &&
form.serviceType !== 'volunteer' &&
form.status !== 'finished') ||
form.status === 'assigned' ||
form.status === 'have_order' ||
(form.status == 'finished' && !form.evaluateFlag)
3 years ago
">完成</el-radio> -->
3 years ago
<el-radio
label="finish"
v-if="
(form.reportType == 'self_help' &&
form.serviceShowFlag &&
form.serviceType !== 'volunteer' &&
form.status !== 'finished') ||
form.status === 'assigned' ||
form.status === 'have_order'
"
>完成</el-radio
>
3 years ago
</el-radio-group>
</el-form-item>
3 years ago
<el-form-item
label="所属网格"
:class="{ 'form-item': source === 'visiual' }"
prop="gridId"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-if="disabled"
v-model="form.gridName"
:disabled="disabled"
class="item_width_1"
></el-input>
3 years ago
<!-- <span >{{ form.gridName }}</span> -->
3 years ago
<el-select
v-else
v-model="form.gridId"
filterable
placeholder="请选择"
class="item_width_1"
clearable
:disabled="disabled"
@change="handleGridChange"
>
<el-option
v-for="item in disabled ? optionsG : optionsEditG"
:key="item.value"
:label="item.label"
:value="item.value"
>
3 years ago
</el-option>
</el-select>
</div>
</el-form-item>
3 years ago
<el-form-item
label="需求类型"
:class="{ 'form-item': source === 'visiual' }"
prop="categoryCode"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-if="disabled"
v-model="form.categoryName"
:disabled="disabled"
class="item_width_1"
clearable
></el-input>
<el-cascader
v-else
v-model="form.categoryCodeArr"
:options="demandOptions"
:disabled="disabled"
clearable
class="item_width_1"
@change="handleCateSlect"
></el-cascader>
3 years ago
</div>
</el-form-item>
3 years ago
<el-form-item
label="上报类型"
:class="{ 'form-item': source === 'visiual' }"
prop="reportType"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-if="disabled"
v-model="form.reportTypeName"
:disabled="disabled"
class="item_width_1"
></el-input>
<el-select
v-else
v-model="form.reportType"
filterable
class="item_width_1"
placeholder="请选择"
clearable
:disabled="disabled"
>
<el-option
v-for="item in reportOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
3 years ago
</el-option>
</el-select>
</div>
</el-form-item>
3 years ago
<el-form-item
label="上报人"
:class="{ 'form-item': source === 'visiual' }"
prop="reportUserName"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="form.reportUserName"
:disabled="disabled"
placeholder="请输入"
class="item_width_1"
clearable
></el-input>
3 years ago
</div>
</el-form-item>
3 years ago
<el-form-item
label="上报人手机号"
:class="{ 'form-item': source === 'visiual' }"
prop="reportUserMobile"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="form.reportUserMobile"
:disabled="disabled"
placeholder="请输入"
class="item_width_1"
maxlength="11"
clearable
></el-input>
3 years ago
</div>
</el-form-item>
3 years ago
<el-form-item
label="上报时间"
:class="{ 'form-item': source === 'visiual' }"
prop="reportTime"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker
v-model="form.reportTime"
type="datetime"
class="item_width_1"
clearable
:disabled="disabled"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
>
3 years ago
</el-date-picker>
</div>
</el-form-item>
3 years ago
<el-form-item
label="需求人"
:class="{ 'form-item': source === 'visiual' }"
prop="demandUserId"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-if="disabled"
v-model="form.demandUserName"
:disabled="disabled"
class="item_width_1"
></el-input>
<el-select
v-else
v-model="form.demandUserId"
class="item_width_1"
filterable
:disabled="disabled"
placeholder="请选择"
clearable
@change="handleDemandChange"
>
<el-option
v-for="item in demandUserList"
:key="item.demandUserId"
:label="item.label"
:value="item.demandUserId"
>
3 years ago
</el-option>
</el-select>
</div>
</el-form-item>
3 years ago
<el-form-item
label="服务时间"
:class="{ 'form-item': source === 'visiual' }"
prop="wantServiceTime"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker
v-model="form.wantServiceTime"
type="datetime"
clearable
:disabled="disabled"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
>
3 years ago
</el-date-picker>
</div>
</el-form-item>
3 years ago
<el-form-item
label="需求内容"
:class="{ 'form-item': source === 'visiual' }"
prop="content"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="form.content"
:autosize="{ minRows: 2, maxRows: 10 }"
:disabled="disabled"
type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"
></el-input>
3 years ago
</div>
</el-form-item>
3 years ago
<el-form-item
v-if="
addType === 'add' ||
addType === 'appoint' ||
addType == 'finish' ||
(addType == 'look' && form.serviceShowFlag)
"
:class="{ 'form-item': source === 'visiual' }"
label="服务方"
prop="serviceType"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
3 years ago
<template v-if="disabled && addType !== 'appoint'">
3 years ago
<el-input
v-model="form.serviceShowName"
:disabled="disabled"
class="item_width_1"
></el-input>
3 years ago
</template>
<template v-else>
3 years ago
<el-select
v-model="form.serviceType"
class="item_width_1-small"
placeholder="请选择"
clearable
:disabled="disabled && addType !== 'appoint'"
@change="handleServiceChange('add', $event)"
>
<el-option
v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
3 years ago
</el-option>
</el-select>
-
3 years ago
<el-select
v-model="form.serverId"
class="item_width_1-middle"
filterable
placeholder="请选择"
clearable
:disabled="disabled && addType !== 'appoint'"
>
<el-option
v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value"
>
3 years ago
</el-option>
</el-select>
</template>
</div>
</el-form-item>
3 years ago
<el-form-item
v-if="addType == 'look' && form.status == 'canceled'"
label="取消时间"
:class="{ 'form-item': source === 'visiual' }"
prop="cancelTime"
>
3 years ago
<span>{{ form.cancelTime }}</span>
</el-form-item>
3 years ago
<template
v-if="
(addType == 'finish' && form.reportType != 'self_help') ||
(addType == 'look' && form.status == 'finished')
"
>
<el-form-item
label="实际服务时间"
:class="{ 'form-item': source === 'visiual' }"
prop="serviceStartTime"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-date-picker
v-model="finishServiceTime"
class="item_width_1-min"
clearable
:disabled="disabled && addType != 'finish'"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handelBlurServiceTime"
>
3 years ago
</el-date-picker>
</div>
</el-form-item>
3 years ago
<el-form-item
label="完成情况"
:class="{ 'form-item': source === 'visiual' }"
prop="finishResult"
>
<el-radio
v-model="form.finishResult"
label="resolved"
:disabled="disabled && addType != 'finish'"
>已解决</el-radio
>
<el-radio
v-model="form.finishResult"
label="unresolved"
:disabled="disabled && addType != 'finish'"
>未解决</el-radio
>
3 years ago
</el-form-item>
3 years ago
<el-form-item
label="评价"
prop="score"
:class="{ 'form-item': source === 'visiual' }"
class="form-score"
>
<el-rate
v-model="form.score"
:allow-half="true"
:disabled="disabled && addType != 'finish'"
></el-rate>
3 years ago
</el-form-item>
3 years ago
<el-form-item
label="备注"
:class="{ 'form-item': source === 'visiual' }"
prop="finishDesc"
>
<div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="form.finishDesc"
:autosize="{ minRows: 2, maxRows: 10 }"
:disabled="disabled && addType != 'finish'"
type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"
></el-input>
3 years ago
</div>
</el-form-item>
</template>
<template v-if="addType == 'finish' && form.reportType == 'self_help'">
3 years ago
<el-form-item
label="实际服务时间"
:class="{ 'form-item': source === 'visiual' }"
prop="serviceStartTime"
>
<div :class="{ 'visiual-form-pickerrange': source === 'visiual' }">
<el-date-picker
v-model="finishServiceTime"
class="item_width_1-min"
clearable
:disabled="disabled && addType != 'finish'"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handelBlurServiceTime"
>
3 years ago
</el-date-picker>
</div>
</el-form-item>
</template>
</el-form>
3 years ago
<div class="div-btn">
<el-button size="small" @click="handlerClose">关闭</el-button>
<el-button
v-if="addType != 'look'"
style="margin-left: 20px"
type="primary"
size="small"
@click="handleSubmit"
>提交</el-button
>
3 years ago
</div>
</el-card>
</div>
3 years ago
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
demandRecId: {
type: String,
default: "",
},
3 years ago
formType: {
type: String,
default: "",
},
3 years ago
// addType: {
// type: String,
// default: "look",
// },
3 years ago
source: {
//展示来源:manage 管理平台 visiual 可视化平台
3 years ago
type: String,
3 years ago
default: "manage",
3 years ago
},
icResiUserId: {
type: String,
3 years ago
default: "",
3 years ago
},
selGridId: {
type: String,
3 years ago
default: "",
},
3 years ago
},
3 years ago
data() {
3 years ago
return {
btnLoading: false,
pageLoading: false,
3 years ago
addType: "look",
3 years ago
form: {
gridId: "",
categoryCodeArr: [],
categoryCode: "",
parentCode: "",
content: "",
reportType: "",
reportUserName: "",
reportUserMobile: "",
reportTime: "",
wantServiceTime: "",
demandUserId: "",
demandUserName: "",
demandUserMobile: "",
},
serviceOptions: [
{
label: "志愿者",
value: "volunteer",
},
// {
// label: '社会组织',
// value: 'social_org'
// },
{
label: "社区自组织",
value: "community_org",
},
{
label: "区域党建单位",
value: "party_unit",
},
],
serviceOptiondList: [],
demandUserList: [],
optionsEditG: [],
reportOptions: [],
demandOptions: [],
selectDemandUser: "",
finishServiceTime: "",
options: [
{
label: "是",
value: 1,
},
{
label: "否",
value: 2,
},
],
rules: {
serviceStartTime: [
{ required: true, message: "实际服务时间不能为空", trigger: "blur" },
],
score: [{ required: true, message: "评分不能为空", trigger: "blur" }],
finishResult: [
{ required: true, message: "完成情况不能为空", trigger: "blur" },
],
},
};
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
3 years ago
disabled() {
3 years ago
return this.addType != "edit" && this.addType != "add";
3 years ago
},
3 years ago
},
watch: {
3 years ago
addType(val) {
3 years ago
this.formatRowForm(val);
},
3 years ago
"form.demandUserId": function (val) {
this.handleDemandChange(val);
},
3 years ago
},
3 years ago
async created() {
if (this.selGridId) {
this.form.gridId = this.selGridId;
}
3 years ago
this.customerId = localStorage.getItem("customerId");
3 years ago
this.getGridList("addorupdate");
3 years ago
this.getDemandOptions();
3 years ago
await this.getDemandUserList();
3 years ago
this.getServiceuserList();
this.getDictOptions();
3 years ago
if (this.formType === "add") {
this.addType = "add";
3 years ago
} else {
this.getInfo();
}
3 years ago
3 years ago
if (this.icResiUserId && this.formType === "add") {
this.demandUserList.forEach((item) => {
if (item.demandUserId == this.icResiUserId)
this.form.demandUserId = item.demandUserId;
});
}
3 years ago
this.pageLoading = true;
},
methods: {
3 years ago
filterEdit(id) {
3 years ago
const { user } = this.$store.state;
return id === user.agencyId;
},
3 years ago
handleCateSlect(val) {
3 years ago
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];
} else {
this.form.parentCode = val[0];
this.form.categoryCode = val[1];
}
},
3 years ago
handleDemandChange(val) {
console.log("val", val);
// this.selectDemandUser = val;
if (val) {
const { demandUserList } = this;
let item = demandUserList.find((item) => item.demandUserId == val);
if (item) {
this.form.demandUserName = item.demandUserName;
this.form.demandUserMobile = item.demandUserMobile;
return;
}
}
this.form.demandUserName = "";
this.form.demandUserMobile = "";
3 years ago
},
3 years ago
handelBlurServiceTime(val) {
3 years ago
console.log("val", val);
if (val.length > 0) {
this.form.serviceStartTime = val[0];
this.form.serviceEndTime = val[1];
}
},
3 years ago
handleServiceChange(type, val) {
3 years ago
if (val === "social_org") {
if (type === "add") this.getServiceuserList(val, "add_demand");
else this.getServiceuserList(val, "query_demand");
} else this.getServiceuserList(val, "");
},
3 years ago
async handleGridChange(val) {
console.log("网格改变了", val);
await this.getDemandUserList();
this.form.demandUserId = "";
3 years ago
},
3 years ago
handelBlurServiceTime(val) {
3 years ago
console.log("val", val);
if (val.length > 0) {
this.form.serviceStartTime = val[0];
this.form.serviceEndTime = val[1];
}
},
3 years ago
handleServiceChange(type, val) {
3 years ago
if (val === "social_org") {
if (type === "add") this.getServiceuserList(val, "add_demand");
else this.getServiceuserList(val, "query_demand");
} else this.getServiceuserList(val, "");
},
3 years ago
handleAdd(addType) {
3 years ago
this.addType = addType;
this.dialogVisible = true;
},
3 years ago
handlerClose() {
3 years ago
this.$emit("close");
},
3 years ago
async formatRowForm(addType) {
3 years ago
this.addType = addType;
const { form: row } = this;
if (addType == "look") {
this.finishServiceTime =
(row.serviceStartTime && [
row.serviceStartTime,
row.serviceEndTime,
]) ||
"";
}
if (addType == "finish") {
3 years ago
if (row.serviceStartTime && row.serviceEndTime) {
3 years ago
this.finishServiceTime = [row.serviceStartTime, row.serviceEndTime];
3 years ago
} else {
3 years ago
this.finishServiceTime = [];
3 years ago
}
3 years ago
this.form.finishResult = "resolved";
this.form.score = 5;
}
if (addType == "appoint" && row.serviceType) {
const type = row.serviceType == "social_org" ? "add_demand" : "";
await this.getServiceuserList(row.serviceType, type);
}
if (addType == "edit") {
await this.getDemandUserList();
this.demandOptions.forEach((item) => {
if (item.value === row.categoryCode)
this.form.categoryCode = [row.categoryCode];
});
}
this.dialogVisible = true;
},
3 years ago
async appointAjax() {
3 years ago
const _form = {
demandRecId: this.form.demandRecId,
serviceType: this.form.serviceType,
serverId: this.form.serverId,
};
await this.$http
.post("/heart/userdemand/assign", _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.handlerClose();
this.getInfo();
3 years ago
this.$emit("success");
3 years ago
return this.$message.success("指派成功");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.btnLoading = false;
},
3 years ago
async finishAjax() {
3 years ago
const { reportType, serviceShowFlag, serviceType } = this.form;
const _form = {
demandRecId: this.form.demandRecId,
serviceStartTime: this.form.serviceStartTime,
serviceEndTime: this.form.serviceEndTime,
finishResult: reportType == "self_help" ? "" : this.form.finishResult,
finishDesc: reportType == "self_help" ? "" : this.form.finishDesc,
serviceId: this.form.serviceId,
score: reportType == "self_help" ? 0 : this.form.score,
};
await this.$http
.post("/heart/userdemand/finish", _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.handlerClose();
this.getInfo();
3 years ago
this.$emit("success");
3 years ago
return this.$message.success("操作成功");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.btnLoading = false;
},
3 years ago
async editCate() {
3 years ago
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];
}
}
const _form = {
...this.form,
};
await this.$http
.post("/heart/userdemand/update", _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.handlerClose();
this.getInfo();
3 years ago
this.$emit("success");
3 years ago
return this.$message.success("修改成功");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.btnLoading = false;
},
3 years ago
handleSubmit() {
3 years ago
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
this.btnLoading = true;
if (this.addType == "add") this.addNew();
else if (this.addType == "edit") this.editCate();
else if (this.addType == "appoint") this.appointAjax();
else if (this.addType == "finish") this.finishAjax();
else if (this.addType == "cancel") this.handleDel();
} else {
console.log("error submit!!");
return false;
}
});
},
3 years ago
async addNew() {
3 years ago
const _form = {
...this.form,
};
await this.$http
.post("/heart/userdemand/add", _form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
3 years ago
this.$emit("handleClose");
return this.$message.success("需求上报成功");
3 years ago
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.btnLoading = false;
},
3 years ago
handleDel() {
3 years ago
let params = {
demandRecId: this.demandRecId,
};
this.$http
.post("/heart/userdemand/cancel", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("取消成功");
this.getInfo();
3 years ago
this.handlerClose();
this.$emit("success");
3 years ago
}
})
.catch((err) => {
return this.$message.error("网络错误");
});
},
3 years ago
getTreeData(data) {
3 years ago
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) };
} else {
_item = { ...item };
}
return _item;
});
return arr;
},
3 years ago
getFlagData(data, flag) {
3 years ago
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) };
else return item;
});
// console.log('arrr-oppp', arr2)
return arr2;
},
3 years ago
async getGridList(type, agencyId) {
3 years ago
const { user } = await this.$store.state;
console.log("user---ppp", user);
// addorupdate query
await this.$http
.post("/gov/org/customergrid/gridoption", {
agencyId: agencyId || user.agencyId,
purpose: type,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
if (type === "query") this.optionsG = res.data;
else this.optionsEditG = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
3 years ago
async getDemandUserList() {
3 years ago
const { user } = await this.$store.state;
console.log("user---ppp", user);
const params = {
agencyId: user.agencyId,
gridId: this.form.gridId,
name: "",
};
// addorupdate
await this.$http
.post("/epmetuser/icresiuser/demandusers", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.demandUserList = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
3 years ago
async getDemandOptions() {
3 years ago
this.$http
.post("/heart/icresidemanddict/demandoption")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.searchdemandOptions = this.getTreeData(res.data);
this.demandOptions = this.getFlagData(
this.getTreeData(res.data),
"usableFlag"
);
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
3 years ago
async getServiceuserList(serviceType, query) {
3 years ago
if (!serviceType) return false;
const { demandUserId } = this.form;
const params = {
serviceName: "",
serviceType: serviceType,
queryPurpose: query,
};
await this.$http
.post("/heart/userdemand/servicelist", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.serviceOptiondList = res.data.filter(
(item) => item.value != demandUserId
);
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
3 years ago
async getDictOptions() {
3 years ago
this.$http
.post("/sys/dict/data/dictlist", { dictType: "user_demand_status" })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.statusOptions = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.$http
.post("/sys/dict/data/dictlist", {
dictType: "user_demand_report_type",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.reportOptions =
res.data && res.data.filter((item) => item.value != "self_help");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
this.$http
.post("/sys/dict/data/dictlist", {
dictType: "user_demand_service_type",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.serviceOptions = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
3 years ago
async getInfo() {
3 years ago
let params = {
demandRecId: this.demandRecId,
};
await this.$http
.post("/heart/userdemand/demandDetail", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form = {
...this.form,
...res.data,
categoryCodeArr: [
res.data.parentCode,
res.data.parentCode + res.data.categoryCode,
],
};
3 years ago
3 years ago
this.finishServiceTime = [
this.form.serviceStartTime,
this.form.serviceEndTime,
];
3 years ago
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
3 years ago
@import "@/assets/scss/modules/management/form-main.scss";
3 years ago
@import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
3 years ago
</style>