+
-
-
+
-
@@ -23,8 +23,8 @@
-
+
-
+
-
+
至
-
+ prop="serviceStatus">
@@ -81,13 +81,13 @@
+ prop="satisfaction">
-
@@ -112,11 +112,11 @@
新增
+ @click="handleAdd">发起服务
- 导出
+ size="small">导出 -->
-
-
-
+
+
+ {{scope.row.serviceTimeStart}}-{{scope.row.serviceTimeEnd}}
+
-
+
+ {{scope.row.serviceStatus==='in_service'?'服务':'已完成'}}
+
-
- 查看
- 详情
+ 编辑
- 反馈
- 删除
+ class="div-table-button--delete">取消
@@ -211,38 +221,34 @@
-
-
-
-
-
-
-
-
- 取消
-
-
+ @closed="showAdd = false">
+
+
+
+
+
@@ -254,16 +260,19 @@ import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
// import eventInfo from "./cpts/event-info";
import axios from "axios";
+import addForm from "./addForm";
+import detailForm from "./detailForm";
+import feedBackForm from "./addForm";
export default {
- components: {},
+ components: { addForm, detailForm, feedBackForm },
data () {
let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键
let nowData = Date.now()
- if (this.formData.startTime) {
- let startTime = new Date(this.formData.startTime)
- return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
+ if (this.formData.serviceTimeStart) {
+ let serviceTimeStart = new Date(this.formData.serviceTimeStart)
+ return time.getTime() > nowData || time.getTime() < serviceTimeStart || time.getTime() === serviceTimeStart
} else {
return time.getTime() > nowData
}
@@ -275,54 +284,46 @@ export default {
}
return {
- pageType: "list", // 列表list 新增add 处理dispose 详情info
+
user: {},
agencyId: '',
tableData: [],
-
+ categrayArray: [],
statusArray: [
{
- value: "processing",
- label: "处理中",
+ value: "in_service",
+ label: "进行中",
},
{
- value: "closed_case",
+ value: "completed",
label: "已完成",
},
],
- qudaoArray: [
- {
- value: "0",
- label: "随手拍/随时讲",
- },
+ satisfyArray: [
{
- value: "1",
- label: "多媒体反应",
+ value: "bad",
+ label: "不满意",
},
{
- value: "2",
- label: "社区电话",
+ value: "good",
+ label: "基本满意",
},
{
- value: "3",
- label: "12345",
- },
- {
- value: "4",
- label: "网络员手持终端",
+ value: "perfect",
+ label: "非常满意",
},
+
],
formData: {
- gridId: '',
- sourceType: '',
- eventContent: '',
- name: '',
- mobile: '',
- startTime: '',
- endTime: '',
- status: '',
+ serviceCategoryId: '',//服务类别id
+ serviceProjectName: '',//项目名称
+ serviceOrgName: '',//服务组织名称
+ serviceTimeStart: '',//服务开始时间yyyy-MM-dd
+ serviceTimeEnd: '',//服务结束时间yyyy-MM-dd
+ serviceStatus: '',//服务状态。in_service服务中;completed:已完成
+ satisfaction: '',//满意度.不满意:bad、基本满意:good、非常满意:perfect
},
pageNo: 1,
@@ -334,13 +335,13 @@ export default {
startPickerOptions: {
disabledDate: startDisabledDate
},
- eventId: '',
-
- eventDetailData: {},
+ serviceRecordId: '',
+ showAdd: false,
+ showDetail: false,
+ showFeedback: false,
+ formType: 'add'
- showVoice: false,
- selVoiceUrl: '',
};
},
computed: {
@@ -352,20 +353,19 @@ export default {
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
- "formData.endTime": function (val) {
- if (val && val != '') {
- let arrayTemp = val.split(' ')
- this.formData.endTime = arrayTemp[0] + ' 23:59:59'
- }
+ // "formData.serviceTimeEnd": function (val) {
+ // if (val && val != '') {
+ // let arrayTemp = val.split(' ')
+ // this.formData.serviceTimeEnd = arrayTemp[0]
+ // }
- },
+ // },
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
-
this.agencyId = this.user.agencyId
-
+ this.getCategrayList()
this.getTableData();
},
methods: {
@@ -375,105 +375,67 @@ export default {
this.pageNo = 1;
this.getTableData();
},
+ // 字典
+ async getCategrayList () {
+ const url = "/sys/dict/data/dictlist"
+ let params = {
+ dictType: 'ic_service_type'
+ }
- async handleExport () {
- const url = "/gov/project/icEvent/export";
- const { pageSize, pageNo, formData } = this;
- axios({
- url: window.SITE_CONFIG["apiURL"] + url,
- method: "post",
- data: {
- pageSize,
- pageNo,
- ...formData,
- },
- responseType: "blob",
- })
- .then((res) => {
- let fileName = window.decodeURI(
- res.headers["content-disposition"].split(";")[1].split("=")[1]
- );
- console.log("filename", fileName);
- let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
- var url = window.URL.createObjectURL(blob);
- var aLink = document.createElement("a");
- aLink.style.display = "none";
- aLink.href = url;
- aLink.setAttribute("download", fileName);
- document.body.appendChild(aLink);
- aLink.click();
- document.body.removeChild(aLink); //下载完成移除元素
- window.URL.revokeObjectURL(url); //释放掉blob对象
- })
- .catch((err) => {
- console.log("获取导出情失败", err);
- return this.$message.error("网络错误");
- });
- },
-
- async handleAdd () {
+ const { data, code, msg } = await requestPost(url, params)
- this.pageType = "add";
+ if (code === 0) {
+ this.categrayArray = data
+ } else {
+ this.$message.error(msg)
+ }
},
- async handleWatch (row) {
- this.eventId = row.icEventId
- this.eventId = row.icEventId
- const url = "/gov/project/icEvent/detail";
- // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
-
- const { data, code, msg } = await requestPost(url, {
- icEventId: this.eventId,
- });
-
- if (code === 0) {
+ async handleAdd () {
+ this.formType = 'add'
+ this.showAdd = true;
+ },
- this.eventDetailData = { ...data };
- this.pageType = "info";
- } else {
- this.$message.error(msg);
- }
+ async handleDetail (row) {
+ this.serviceRecordId = row.serviceRecordId
+ this.formType = 'detail'
+ // this.showDetail = true
+ this.showAdd = true;
},
//加载组织数据
async handleDispose (row) {
- this.eventId = row.icEventId
+ this.serviceRecordId = row.serviceRecordId
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
- icEventId: this.eventId,
+ serviceRecordId: this.serviceRecordId,
});
if (code === 0) {
this.eventDetailData = { ...data };
- this.pageType = "dispose";
+
} else {
this.$message.error(msg);
}
},
- //显示语音窗口
- handleShowVoice (url) {
- this.selVoiceUrl = url
- this.showVoice = true
- },
handleClose () {
- this.pageType = "list";
- this.eventId = ""
+ this.serviceRecordId = ""
+ this.formType = ''
+
+ this.showAdd = false;
this.getTableData()
},
handleOk () {
- this.pageType = "list";
- this.eventId = ""
+ this.handleClose()
this.pageNo = 1
- this.getTableData()
-
},
@@ -501,8 +463,8 @@ export default {
},
async getTableData () {
- const url = "/gov/project/icEvent/list";
- // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
+ // const url = "/heart/icServiceProject/service/recordList";
+ const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
@@ -535,6 +497,41 @@ export default {
}
},
+ async handleExport () {
+ const url = "/gov/project/icEvent/export";
+ const { pageSize, pageNo, formData } = this;
+ axios({
+ url: window.SITE_CONFIG["apiURL"] + url,
+ method: "post",
+ data: {
+ pageSize,
+ pageNo,
+ ...formData,
+ },
+ responseType: "blob",
+ })
+ .then((res) => {
+ let fileName = window.decodeURI(
+ res.headers["content-disposition"].split(";")[1].split("=")[1]
+ );
+ console.log("filename", fileName);
+ let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
+ var url = window.URL.createObjectURL(blob);
+ var aLink = document.createElement("a");
+ aLink.style.display = "none";
+ aLink.href = url;
+ aLink.setAttribute("download", fileName);
+ document.body.appendChild(aLink);
+ aLink.click();
+ document.body.removeChild(aLink); //下载完成移除元素
+ window.URL.revokeObjectURL(url); //释放掉blob对象
+ })
+ .catch((err) => {
+ console.log("获取导出情失败", err);
+ return this.$message.error("网络错误");
+ });
+ },
+
handleSizeChange (val) {
this.pageSize = val;
@@ -550,18 +547,18 @@ export default {
resetSearch () {
this.formData = {
gridId: '',
- sourceType: '',
- eventContent: '',
- name: '',
+ serviceCategoryId: '',
+ serviceProjectName: '',
+ serviceOrgName: '',
mobile: '',
- startTime: '',
- endTime: '',
- status: '',
+ serviceTimeStart: '',
+ serviceTimeEnd: '',
+ serviceStatus: '',
}
- // this.pageNo = 1
- // this.loadTable()
+ this.pageNo = 1
+ // this.getTableData()
},
},
};