* v524

* v524
This commit is contained in:
jr719 2021-05-24 13:26:59 +08:00 committed by GitHub
parent 2c56d37d99
commit 871116838e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1050 additions and 357 deletions

View File

@ -5,3 +5,8 @@ ENV = 'development'
#VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://app.rt.xianci.info/'
#VUE_APP_BASE_API = 'http://api.rt.myntv.cn/'
# base url
VUE_APP_BASE_URL = 'http://admin.rt.xianci.info'

View File

@ -4,3 +4,5 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = 'http://api.rt.myntv.cn/'
# base url
VUE_APP_BASE_URL = 'http://new.rtmedia.myntv.cn/'

View File

@ -6,3 +6,5 @@ ENV = 'staging'
# base api
VUE_APP_BASE_API = 'http://app.rt.xianci.info/'
# base url
VUE_APP_BASE_URL = 'http://admin.rt.xianci.info'

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
.DS_Store
node_modules/
convenience-prod/
convenience-dev/
dist/
convenience-prod/
npm-debug.log*

View File

@ -7,6 +7,7 @@
"dev": "vue-cli-service serve",
"lint": "eslint --ext .js,.vue src",
"build:prod": "vue-cli-service build",
"build:dev": "vue-cli-service build --mode development",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"new": "plop",

View File

@ -75,3 +75,29 @@ export function communicationList(data) {
data
})
}
/**
* 监察工单列表
* @param {*} data
* @returns
*/
export function listOnlyLook(data) {
return request({
url: '/api/convenience/v2/services/listOnlyLook',
method: 'post',
data
})
}
// /convenience/v2/services/listForData
/**
* 统计数据工单列表筛选
* @param {*} data
* @returns
*/
export function listForData(data) {
return request({
url: '/api/convenience/v2/services/listForData',
method: 'post',
data
})
}

View File

@ -26,6 +26,18 @@ export function addResidentInfoList(data) {
});
}
/**
* 居民信息详情
* @param {*} id
* @returns
*/
export function residentInfo(id) {
return request({
url: "/api/convenience/residentInformation",
method: "get",
params: id
});
}
/**
* 居民信息修改
* @param {*} data
@ -48,7 +60,6 @@ export function deleteResident(id) {
return request({
url: "/api/convenience/residentInformation",
method: "delete",
params:id
params: id
});
}

View File

@ -140,7 +140,7 @@ export const constantRoutes = [
name: "WorkBook",
redirect: "/workBook/list",
meta: {
title: "工作手册管理",
title: "工作手册",
icon: "list"
},
hidden: false,
@ -153,7 +153,7 @@ export const constantRoutes = [
title: "工作手册列表",
icon: "workBook",
affix: true,
parentTitle: "工作手册管理"
parentTitle: "工作手册"
}
},
{

View File

@ -41,6 +41,8 @@
<el-button
v-if="
convenience &&
convenience.isSelf &&
convenience.statusList[0] &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status !== 'WAIT_APPLY' &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
@ -67,7 +69,11 @@
</div>
<div>
<el-button
v-if="convenience && convenience.phase === 'PENDING_ORDER'"
v-if="
convenience &&
convenience.isSelf &&
convenience.phase === 'PENDING_ORDER'
"
style="margin-right:16px"
type="primary"
@click="handleUpdate(5)"
@ -76,6 +82,8 @@
<el-button
v-if="
convenience &&
convenience.isSelf &&
convenience.statusList[0] &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
convenience.phase === 'PREREQUISITES' &&
convenience.statusList[0].status !== 'FORWARDED_APPLY' &&
@ -88,7 +96,7 @@
>
<el-button
v-if="
convenience &&
convenience &&convenience.isSelf &&
convenience.phase !== 'FINISH' &&
convenience.phase === 'PROCESSING' &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
@ -106,7 +114,8 @@
<el-button
v-if="
convenience &&
convenience &&convenience.isSelf &&
convenience.statusList[0] &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status !== 'WAIT_APPLY' &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
@ -121,7 +130,8 @@
<el-button
v-if="
convenience &&
convenience &&convenience.isSelf &&
convenience.statusList[0] &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
convenience.statusList[0].status !== 'FORWARDED_APPLY' &&
@ -181,6 +191,7 @@
style="display: flex;align-items: center;flex-direction:column"
>
<div
v-if="convenience && convenience.isSelf && convenience.statusList[0] "
style="width:100%;display: flex;align-items: center;"
class="status_btn"
>
@ -219,7 +230,7 @@
<el-button
v-if="
convenience &&
convenience && convenience.isSelf &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status === 'FORWARDED_APPLY' &&
convenience &&
@ -233,7 +244,7 @@
<div
v-if="
convenience &&
convenience && convenience.isSelf &&
convenience.statusList[0].status === 'WAIT_APPLY'
"
style="margin-left:10px"
@ -250,7 +261,7 @@
:span="6"
style="display:flex"
class="appeal"
v-if="convenience && convenience.evaluation"
v-if="convenience && convenience.isSelf && convenience.evaluation"
>
<div>
办事评价
@ -419,7 +430,9 @@
</div>
<div style="float: right">
<el-button
v-if="convenience && convenience.phase !== 'FINISH'"
v-if="
convenience && convenience.isSelf && convenience.phase !== 'FINISH'
"
type="primary"
style="margin-right:73px;"
@click="handleContact"
@ -671,9 +684,8 @@
>
<div class="preview-container">
<el-form ref="updateForm" style="width:100%" :rules="rules">
<el-form-item label="选择行政区域" v-if="updateType!==6">
<el-form-item label="选择行政区域" v-if="updateType !== 6&&updateType!==7">
<el-cascader
class="filter-item"
v-model="regionSearchVal"
style="width:100%"
@ -714,7 +726,7 @@
v-if="updateType === 8 || updateType === 14"
label="选择被转交人"
>
<span
<span
v-if="!staffOptions.length > 0"
style="font-size:12px;color:red"
>该行政区域下无工作人员</span
@ -739,7 +751,9 @@
<el-form-item
:label="
`${
convenience && convenience.statusList[0].status === 'WAIT_APPLY'
convenience &&
convenience.statusList[0] &&
convenience.statusList[0].status === 'WAIT_APPLY'
? '请输入不通过理由'
: updateType === 16
? '申诉理由'
@ -942,7 +956,7 @@ export default {
created() {
this.getInfo();
this.getStaffList();
this.getCommunicationList();
// this.getCommunicationList();
this.getTypeList();
this.getRegionList();
},
@ -1217,7 +1231,7 @@ export default {
const tempLen = this.regionIds.split(",").length;
this.regionSearchVal = [];
this.staffQuery.regionIds = this.regionIds
this.staffQuery.regionIds = this.regionIds;
switch (tempLen) {
case 1:
console.log(1);

View File

@ -71,12 +71,18 @@
</p>
</div>
<div style="flex:1">
<p>申办人{{ item.residentInformation.name }}</p>
<p>
申办人{{
item.residentInformation !== null
? item.residentInformation.name
: ""
}}
</p>
<!-- v-if="!isLeader" -->
<p v-if="listQuery.status!==undefined">
状态<span style="color:#ff5a00">{{
item.statusList[0].status | statusFilter
}}</span>
<!-- <span v-html="timeoutType(item,index)"></span> -->
</p>
</div>
<div style="flex:1">
@ -85,28 +91,15 @@
<div
style="flex:1;align-items: center;justify-items: center;display: flex;"
>
<!-- <p style="font-size:20px;color:#ff6918">
<i class="icon_timer" />{{
(timers && timeFormat(timers[index].time)) || "00:00:00"
}}
</p>
<p>
<el-button
v-if="item.phase === 'PENDING_ORDER'"
style="margin-left:44px;font-size:14px;padding:7px 10px;width:70px"
type="primary"
size="mini"
@click="handleUpdate(item, 5)"
>接单</el-button
>
</p> -->
<div style="font-size:20px;color:#ff6918">
<i class="icon_timer" />{{
(timers && timeFormat(timers[index].time)) || "00:00:00"
}}
<div>
<!-- v-has="!'WORKORDER_ADMIN'" -->
<el-button
v-if="item.phase === 'PENDING_ORDER'"
v-if="listQuery.status!==undefined&&item.phase === 'PENDING_ORDER'"
style="margin-left:44px;font-size:14px;padding:7px 10px;width:70px;margin-top:12px"
type="primary"
size="mini"
@ -173,22 +166,6 @@
<AliOss v-model="payload.attachmentList" multiple />
</el-form-item>
<!-- <el-form-item label="附件">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList"
>
<el-button size="small" type="primary">上传附件</el-button>
</el-upload>
</el-form-item> -->
<el-form-item v-if="updateType === 13">
<el-radio-group v-model="payload.approve">
<el-radio :label="true">通过</el-radio>
@ -207,7 +184,7 @@
<script>
// import Pagination from "@/components/Pagination";
import { list, typeList, update } from "@/api/convenience";
import { list, listOnlyLook, typeList, update } from "@/api/convenience";
import { parseTime } from "@/utils";
import { staffList } from "@/api/staff";
import AliOss from "@/components/AliOSS/index.vue";
@ -295,7 +272,9 @@ export default {
ids: [{ required: true, message: "请选择操作对象", trigger: "change" }]
},
timers: undefined,
timersInterval: undefined
timersInterval: undefined,
isLeader: false,
isStatusFilter: false
};
},
watch: {
@ -311,112 +290,356 @@ export default {
//
handler(val) {
this.listQuery.status = val;
// console.log(this.listQuery.status);
this.getList();
},
deep: true // true
}
},
created() {
this.isLeader = sessionStorage
.getItem("Permissions")
.includes("WORKORDER_ADMIN");
// console.log(this.isLeader);
this.getList();
this.getStaffList();
},
methods: {
getList() {
this.listLoading = true;
list(this.listQuery).then(res => {
this.list = res.d.records;
this.listLoading = false;
clearInterval(this.timersInterval);
const tempData = res.d.records;
const now = Date.parse(new Date()).toString() / 1000;
// console.log(now);
const arr = [];
tempData.map((item, index) => {
let msec = [];
let obj = {};
switch (item.phase) {
case "PENDING_ORDER":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime + item.prerequisitesTime + item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
//
break;
default:
break;
}
});
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
if (this.isLeader) {
if (this.listQuery.status) {
list(this.listQuery).then(res => {
this.list = res.d.records;
this.listLoading = false;
clearInterval(this.timersInterval);
const tempData = res.d.records;
const now = Date.parse(new Date()).toString() / 1000;
const arr = [];
tempData.map((item, index) => {
let msec = [];
let obj = {};
switch (item.phase) {
case "PENDING_ORDER":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime +
item.prerequisitesTime +
item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
//
break;
default:
break;
}
});
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit * 3600
) {
item.status = true;
}
}
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit * 3600
) {
item.status = true;
}
}
}
}
});
}
this.timers = arr;
this.timersInterval = setInterval(() => {
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit *
3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
}, 1000);
});
} else {
listOnlyLook(this.listQuery).then(res => {
this.list = res.d.records;
this.listLoading = false;
clearInterval(this.timersInterval);
const tempData = res.d.records;
const now = Date.parse(new Date()).toString() / 1000;
const arr = [];
tempData.map((item, index) => {
if (item.residentInformation === null) {
console.log(index);
}
let msec = [];
let obj = {};
switch (item.phase) {
case "PENDING_ORDER":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime +
item.prerequisitesTime +
item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
//
break;
default:
break;
}
});
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit * 3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
this.timersInterval = setInterval(() => {
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit *
3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
}, 1000);
});
}
this.timers = arr;
this.timersInterval = setInterval(() => {
} else {
// console.log('else:'+this.isLeader);
list(this.listQuery).then(res => {
this.list = res.d.records;
this.listLoading = false;
clearInterval(this.timersInterval);
const tempData = res.d.records;
const now = Date.parse(new Date()).toString() / 1000;
const arr = [];
tempData.map((item, index) => {
let msec = [];
let obj = {};
switch (item.phase) {
case "PENDING_ORDER":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime +
item.prerequisitesTime +
item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
//
break;
default:
break;
}
});
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
@ -452,9 +675,48 @@ export default {
});
}
this.timers = arr;
}, 1000);
});
this.timersInterval = setInterval(() => {
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.list[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.list[index].eventType.timeoutReminder * 3600
) {
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit * 3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
}, 1000);
});
}
},
// getList2() {},
getTypeList() {
typeList().then(res => {
// console.log(res);
@ -534,7 +796,6 @@ export default {
}, 100);
},
handleFilterPhase(phase, event) {
// console.log(event.target.tagName==='SPAN');
if (event.target.tagName === "SPAN") {
event.target.parentElement.setAttribute(
"class",
@ -576,43 +837,18 @@ export default {
: Math.floor(((timeStamp % 86400) % 3600) % 60)
}`;
return timeStr;
},
countdown(index, status) {
//
}
// timeoutType(row,index) {
// let tempData = Object.assign({}, row);
// switch (tempData.phase) {
// case "PENDING_ORDER":
// // tempData.acceptanceTime
// this.timers[index]
// break;
// }
// let statusEl = '<i class="icon_timeout"></i>'; //'<i class="icon_timeoutYet"></i>'
// return statusEl;
// }
}
};
</script>
<style scope>
/* .el-form {
width: 100% !important;
} */
.text-warning {
color: #e6a23c;
}
.tb .el-button {
margin-bottom: 5px;
}
/* .el-table__body tr.hover-row > td:first-child,
.el-table__body tr.hover-row.current-row > td,
.el-table__body tr.hover-row.el-table__row--striped > td,
.el-table__body tr.hover-row.el-table__row--striped.current-row > td {
background-color: #f5f7fa;
border-left: 5px solid #1890ff !important;
} */
.app-container .title {
border-left: 5px solid #1890ff;
padding-left: 8px;

View File

@ -1,98 +1,249 @@
<template>
<!-- <el-row :gutter="40" class="panel-group">
<el-col
v-for="(value, key, index) in statisticalData"
:key="index"
:xs="12"
:sm="12"
:lg="key==='all'?12:6"
class="card-panel-col"
>
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
<i class="icon_"></i>
</div>
<div class="card-panel-description">
<div v-if="key==='all'">累计服务量 </div>
<div class="card-panel-text">
{{ key == "all" ? "总服务量" : key }}
</div>
<div class="numText">{{value}}</div>
<count-to
:start-val="0"
:end-val="value"
:duration="2600"
class="card-panel-num"
<div>
<el-row :gutter="20">
<el-col
:xs="24"
:lg="24"
:sm="24"
style="color:#787878;margin-bottom:20px"
><span>数据统计</span
><el-button
v-has="'WORKORDER_ADMIN'"
type="primary"
target="blank"
@click="toTj"
style="border-radius:21px;margin-left:10px;margin-right:10px"
>统计图表</el-button
>
<span v-has="'WORKORDER_ADMIN'">
当前区域<el-cascader
class="filter-item"
v-model="regionSearchVal"
style="width:240px"
:options="regions"
:props="{ checkStrictly: true }"
placeholder="行政区域"
@change="handleRegionChange"
/>
</div>
</div>
</el-col>
</el-row> -->
<el-row :gutter="20">
<el-col :xs="24" :lg="24" :sm="24" style="color:#787878;margin-bottom:20px"
><span>数据统计</span
><el-button
v-has="'WORKORDER_ADMIN'"
type="primary"
target="blank"
@click="toTj"
style="border-radius:21px;margin-left:10px"
>统计图表</el-button
><span style="float:right"
>更新时间{{ new Date() | parseTime("{y}-{m}-{d} {h}:00:00") }}</span
></el-col
>
<el-col
v-for="(value, key, index) in statisticalData"
:key="index"
:xs="12"
:sm="12"
:lg="key === 'all' ? 12 : 6"
>
<div class="countLayout">
<i :class="`countIcon icon_${index}`"></i>
<span v-if="key === 'all'" style="font-size:24px"
>累计服务量 <span
style="color:#ff663d;font-size:49px;vertical-align: middle;"
>{{ value }}</span
></span
>
</span>
<span style="float:right"
>更新时间{{ new Date() | parseTime("{y}-{m}-{d} {h}:00:00") }}</span
></el-col
>
<el-col
v-for="(value, key, index) in statisticalData"
:key="index"
:xs="12"
:sm="12"
:lg="key === 'all' ? 12 : 6"
>
<div
v-else
style="flex: 1;text-align: right;padding-right:51px;font-size:16px;"
class="countLayout"
@click="key !== 'all' && showDetail(key)"
:style="{ cursor: key !== 'all' && 'pointer' }"
>
<div style="margin-bottom:17px">{{ key }}</div>
<div style="font-size:20px;color:#787878;">
{{ formatUnit(key, value) }}
<i :class="`countIcon icon_${index}`"></i>
<span v-if="key === 'all'" style="font-size:24px"
>累计服务量 <span
style="color:#ff663d;font-size:49px;vertical-align: middle;"
>{{ value }}</span
></span
>
<div
v-else
style="flex: 1;text-align: right;padding-right:51px;font-size:16px;"
>
<div style="margin-bottom:17px">{{ key }}</div>
<div style="font-size:20px;color:#787878;">
{{ formatUnit(key, value) }}
</div>
</div>
</div>
</el-col>
</el-row>
<el-dialog :title="dialogTitle" :visible.sync="dialogDetail" width="80%">
<!-- <el-table :data="convenienceList"></el-table> -->
<div class="convenienceList" v-loading="listLoading">
<div
v-for="(item, index) in convenienceList"
:key="item.id"
class="convenience_item"
@click="
$router.push({
path: '/convenience/detail',
query: { id: item.id }
})
"
>
<div class="convenience_item_title" style="flex:1">
<i class="icon_list" />
<div>
<div class="cTitle">{{ item.eventType.eventName }}</div>
<div class="createDate">
{{ item.sponsor | sponsorFilter }}创建于{{
item.createDate | parseTime("{y}-{m}-{d} {h}:{i}:{s}")
}}
</div>
</div>
</div>
<div style="display:flex;flex:2;font-size:14px;color:#787878">
<div style="flex:1">
<p>流水号{{ item.serialNumber }}</p>
<p>
阶段{{ item.phase | phaseFilter }}
<i
class="icon_timeout"
v-if="timers && timers[index].status !== null"
></i>
<span style="color:#ff3000">{{
timers && timers[index].status === null
? ""
: timers && timers[index].status
? "已超时"
: "即将超时"
}}</span>
</p>
</div>
<div style="flex:1">
<p>
申办人{{
item.residentInformation && item.residentInformation.name
}}
</p>
<p>
状态<span style="color:#ff5a00">{{
item.statusList[0].status | statusFilter
}}</span>
</p>
</div>
<div style="flex:1">
<p>
受理人{{
item.residentInformation && item.firstResponsiblePerson.name
}}
</p>
</div>
<div
style="flex:1;align-items: center;justify-items: center;display: flex;"
>
<div style="font-size:20px;color:#ff6918">
<i class="icon_timer" />{{
(timers && timeFormat(timers[index].time)) || "00:00:00"
}}
<div>
<!-- <el-button
v-if="item.phase === 'PENDING_ORDER'"
style="margin-left:44px;font-size:14px;padding:7px 10px;width:70px;margin-top:12px"
type="primary"
size="mini"
@click.stop="handleUpdate(item, 5)"
>接单</el-button
> -->
</div>
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogDetail = false"> </el-button>
<!-- <el-button type="primary" @click="dialogDetail = false"
> </el-button
> -->
</span>
</el-dialog>
</div>
</template>
<script>
import CountTo from "vue-count-to";
// import RegionSelect from "@/components/RegionSelect";
import { parseTime } from "@/utils";
import { getRegions } from "@/api/region";
import { statisticalData } from "@/api/statisticalData";
import { mapGetters } from "vuex";
import { listForData } from "@/api/convenience";
export default {
components: {
CountTo
},
data() {
return {
listQuery: {
regionIds: undefined,
residentInformationId: undefined,
eventTypeId: undefined
},
statisticalData: undefined
statisticalData: undefined,
checkStrictly: false,
regionSearchVal: undefined,
// regionIds: undefined,
regions: [],
dialogDetail: false,
dialogTitle: "提示",
convenienceList: [],
timers: undefined,
timersInterval: undefined,
listLoading: false
};
},
components: {
CountTo
// RegionSelect
},
filters: {
sponsorFilter(status) {
const statusMap = {
SELF: "群众",
STAFF: "工作人员"
};
return statusMap[status];
},
phaseFilter(status) {
const statusMap = {
PENDING_ORDER: "待接单",
PREREQUISITES: "要件准备中",
PROCESSING: "办理中",
FINISH: "办结"
};
return statusMap[status];
},
statusFilter(status) {
const statusMap = {
MINE: "我处理",
FORWARDED: "已转交",
FORWARDED_APPLY: "转交超限审批中",
SUBMIT_APPLY: "已提交审批",
WAIT_APPLY: "待审核"
};
return statusMap[status];
},
typeFilter(status) {
const statusMap = {
1: "建立工单",
2: "撤销工单",
3: "沟通",
4: "调整工单类别",
5: "接单",
6: "要件齐备",
7: "办结",
8: "转交超限审批提交",
9: "转交超限审批撤销",
10: "转交超限审批",
11: "发起审批",
12: "撤销审批",
13: "审批操作",
14: "转交"
};
return statusMap[status];
}
},
computed: {
...mapGetters(["regionIds"])
},
created() {
this.getStatisticalData();
this.getRegions();
this.regionSearchVal = this.regionIds;
this.listQuery.regionIds = this.regionIds;
},
methods: {
// handleSetLineChartData(type) {
@ -155,9 +306,204 @@ export default {
}`;
return timeStr;
},
toTj(){
window.open('http://new.rtmedia.myntv.cn/static/largeScreen/leaderForTv.html')
console.log(window);
toTj() {
window.open(
// "http://localhost:9527/static/largeScreen/leaderForTv.html?regionIds="+this.regionIds
`${process.env.VUE_APP_BASE_URL}/static/largeScreen/leaderForTv.html?regionIds=${this.listQuery.regionIds}`
//"http://new.rtmedia.myntv.cn/static/largeScreen/leaderForTv.html?regionIds=" + this.regionIds
);
// console.log(window);
},
getRegions() {
getRegions().then(res => {
const tempData = res.d;
const countyArr = []; // ,1
tempData.map(county => {
const countyObj = {
value: county.root.id,
label: county.root.name,
disabled: !county.root.check,
children: []
};
countyArr.push(countyObj);
county.node.map(town => {
const townObj = {
value: town.root.id,
label: town.root.name,
disabled: !town.root.check,
children: []
};
countyObj.children.push(townObj);
town.node.map(country => {
townObj.children.push({
value: country.root.id,
label: country.root.name,
disabled: !country.root.check
});
});
});
});
this.regions = countyArr;
});
},
handleRegionChange(val) {
// console.log(val);
this.listQuery.regionIds = val.join(",");
this.getStatisticalData();
},
showDetail(key) {
this.convenienceList = undefined;
this.listLoading = true;
listForData({
key,
regionIds: this.listQuery.regionIds
})
.then(res => {
this.listLoading = false;
this.convenienceList = res.d.list;
clearInterval(this.timersInterval);
const tempData = res.d.list;
const now = Date.parse(new Date()).toString() / 1000;
// console.log(now);
const arr = [];
console.log(tempData);
tempData.map((item, index) => {
let msec = [];
let obj = {};
switch (item.phase) {
case "PENDING_ORDER":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime +
item.prerequisitesTime +
item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
};
arr.push(obj);
//
break;
default:
break;
}
});
if (arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.convenienceList[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.convenienceList[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.convenienceList[index].eventType.timeoutReminder *
3600
) {
item.status = false;
if (
item.time >=
this.convenienceList[index].eventType
.commitmentTimeLimit *
3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
this.timersInterval = setInterval(() => {
if (this.convenienceList && arr.length > 0) {
arr.map((item, index) => {
if (item.phase !== "FINISH") {
item.time++;
if (this.convenienceList[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false;
if (item.time >= 86400) {
item.status = true;
}
}
}
}
if (this.convenienceList[index].phase === "PROCESSING") {
if (item.status == null) {
// &&item.time<this.list[index].eventType.commitmentTimeLimit
if (
item.time >
this.convenienceList[index].eventType.timeoutReminder *
3600
) {
item.status = false;
if (
item.time >=
this.convenienceList[index].eventType
.commitmentTimeLimit *
3600
) {
item.status = true;
}
}
}
}
}
});
}
this.timers = arr;
}, 1000);
})
.catch(error => {
this.listLoading = false;
});
this.dialogTitle = key;
this.dialogDetail = true;
}
}
};
@ -369,4 +715,48 @@ export default {
}
}
}
// .el-dialog__body{
// background: #f7fafd !important;
// }
.convenience_item {
padding: 32px;
margin-bottom: 10px;
background-color: #f7fafd;
border-radius: 4px;
display: flex;
cursor: pointer;
}
.convenience_item_title {
display: flex;
flex: 1;
align-items: center;
line-height: 25px;
}
.cTitle {
font-size: 18px;
color: #000000;
}
.convenience_item_title .createDate {
color: #787878;
font-size: 14px;
}
.icon_list {
background: url("../../../convenience/img/icon_list.png") no-repeat;
background-size: cover;
display: inline-block;
width: 52px;
height: 51px;
margin-right: 12px;
}
.icon_timer {
background: url("../../../convenience/img/icon_timer.png") no-repeat;
background-size: cover;
display: inline-block;
width: 18px;
height: 18px;
margin-right: 4px;
vertical-align: baseline;
margin-left: 24px;
}
</style>

View File

@ -128,8 +128,8 @@ export default {
loginForm: {
username: "", //18882564006
captcha: "",
//username: "18882564006", //18882564006
//captcha: "111111",
// username: "18882564006", //18882564006
// captcha: "111111",
appVersion: "1.0.0",
system: "IOS",
device: navigator.userAgent,

View File

@ -309,7 +309,8 @@ import {
getResidentInfoList,
addResidentInfoList,
updateResidentInfo,
deleteResident
deleteResident,
residentInfo
} from "@/api/residentInformation";
import RegionSelect from "@/components/RegionSelect";
import { getRegions } from "@/api/region";
@ -491,8 +492,8 @@ export default {
this.$notify.success("创建成功");
this.dialogAddVisible = false;
this.getList();
}else{
this.$notify.error(res.m)
} else {
this.$notify.error(res.m);
}
});
}
@ -509,32 +510,32 @@ export default {
this.$notify.success("修改成功");
this.dialogAddVisible = false;
this.getList();
}else{
this.$notify.error(res.m)
} else {
this.$notify.error(res.m);
}
});
}
});
},
handleEdit(row) {
// this.$nextTick(() => {
residentInfo({ id: row.id }).then(res => {
// console.log(res);
this.residentInfo = Object.assign({}, res.d);
let arr = [];
if (this.residentInfo.permanentResidenceRegion) {
arr.push(this.residentInfo.permanentResidenceRegion);
}
if (this.residentInfo.permanentResidenceTown) {
arr.push(this.residentInfo.permanentResidenceTown);
}
if (this.residentInfo.permanentResidenceTownShip) {
arr.push(this.residentInfo.permanentResidenceTownShip);
}
this.residentInfo.regionIds = arr;
this.residentInfo = Object.assign({}, row);
let arr = [];
if (this.residentInfo.permanentResidenceRegion) {
arr.push(this.residentInfo.permanentResidenceRegion);
}
if (this.residentInfo.permanentResidenceTown) {
arr.push(this.residentInfo.permanentResidenceTown);
}
if (this.residentInfo.permanentResidenceTownShip) {
arr.push(this.residentInfo.permanentResidenceTownShip);
}
this.residentInfo.regionIds = arr;
this.dialogStatus = "update";
this.dialogAddVisible = true;
// },100);
this.dialogStatus = "update";
this.dialogAddVisible = true;
});
},
handleDelete(row) {
this.residentInfo = Object.assign({}, row);
@ -547,9 +548,9 @@ export default {
this.$notify.success("删除成功");
this.dialogDeleteConfirm = false;
this.getList();
}else{
this.$notify.error(res.m)
}
} else {
this.$notify.error(res.m);
}
});
},
handleIsStaff(val) {
@ -582,7 +583,7 @@ export default {
this.dialogExcelImport = false;
this.getList();
} else {
this.$notify.error(res.m)
this.$notify.error(res.m);
setTimeout(() => {
this.excelUploading = false;
}, 3000);

View File

@ -1,20 +1,23 @@
<template>
<div class="app-container">
<el-form>
<el-form-item label="新闻标题:">
<el-form-item label="工作手册标题:">
<span>{{ info.title }}</span>
</el-form-item>
<!-- <el-form-item label="新闻副标题:">
<span>{{info.title}}</span>
</el-form-item> -->
<el-form-item label="新闻简介:">
<el-form-item label="工作手册简介:">
<span>{{ info.introduction }}</span>
</el-form-item>
<el-form-item label="发布时间:">
<span>{{ info.releaseTime | parseTime }}</span>
<el-form-item v-if="info.videoUrl !== '' && info.videoUrl !== null">
<video
:src="info.videoUrl"
style="width:600px;height:300px"
controls
></video>
</el-form-item>
</el-form>
<Editor v-model="info.content" style="width: 100%" :disabled="true"/>
<!-- <Editor v-model="info.content" style="width: 100%" :disabled="true" /> -->
<div v-html="info.content"></div>
</div>
</template>

View File

@ -18,13 +18,13 @@
highlight-current-row
style="width: 100%;"
>
<el-table-column label="新闻id" align="center">
<el-table-column label="工作手册id" align="center">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="新闻标题" align="center">
<el-table-column label="工作手册标题" align="center">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
@ -36,7 +36,7 @@
</template>
</el-table-column> -->
<el-table-column label="新闻简介" align="center">
<el-table-column label="工作手册简介" align="center">
<template slot-scope="scope">
<span>{{ scope.row.introduction }}</span>
</template>
@ -48,11 +48,11 @@
</template>
</el-table-column> -->
<el-table-column label="发布时间" align="center">
<!-- <el-table-column label="发布时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.releaseTime | parseTime }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="300px" fixed="right" align="center">
<template slot-scope="scope">
@ -97,8 +97,10 @@ export default {
},
methods: {
getList() {
this.listLoading = true;
workBookList(this.listQuery).then(res => {
// console.log(res)
this.listLoading = false;
this.list = res.d.records;
});
}

View File

@ -1,21 +1,22 @@
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
"use strict";
const path = require("path");
const defaultSettings = require("./src/settings.js");
function resolve(dir) {
return path.join(__dirname, dir)
return path.join(__dirname, dir);
}
const name = defaultSettings.title || '定点服务系统' // page title
const name = defaultSettings.title || "定点服务系统"; // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
// You can change the port by the following method:
// port = 9527 npm run dev OR npm run dev --port = 9527
const port = process.env.port || process.env.npm_config_port || 9527 // dev port
const port = process.env.port || process.env.npm_config_port || 9527; // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
console.log(process.env.env);
module.exports = {
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
@ -24,11 +25,12 @@ module.exports = {
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/',
publicPath: "/",
// outputDir: 'dist',
outputDir: process.env.NODE_ENV === 'development' ? 'convenience-dev' : 'convenience-prod',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
outputDir:
process.env.env === "development" ? "convenience-dev" : "convenience-prod",
assetsDir: "static",
lintOnSave: process.env.NODE_ENV === "development",
productionSourceMap: false,
devServer: {
port: port,
@ -37,7 +39,7 @@ module.exports = {
warnings: false,
errors: true
},
before: require('./mock/mock-server.js')
before: require("./mock/mock-server.js")
},
configureWebpack: {
// provide the app's title in webpack's name field, so that
@ -45,81 +47,79 @@ module.exports = {
name: name,
resolve: {
alias: {
'@': resolve('src')
"@": resolve("src")
}
}
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload
// it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [
config.plugin("preload").tap(() => [
{
rel: 'preload',
rel: "preload",
// to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
include: "initial"
}
])
]);
// when there are many pages, it will cause too many meaningless requests
config.plugins.delete('prefetch')
config.plugins.delete("prefetch");
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
.rule("svg")
.exclude.add(resolve("src/icons"))
.end();
config.module
.rule('icons')
.rule("icons")
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.include.add(resolve("src/icons"))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({
symbolId: 'icon-[name]'
symbolId: "icon-[name]"
})
.end()
.end();
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
config.when(process.env.NODE_ENV !== "development", config => {
config
.plugin("ScriptExtHtmlWebpackPlugin")
.after("html")
.use("script-ext-html-webpack-plugin", [
{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
inline: /runtime\..*\.js$/
}
])
.end();
config.optimization.splitChunks({
chunks: "all",
cacheGroups: {
libs: {
name: "chunk-libs",
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: "initial" // only package third parties that are initially dependent
},
elementUI: {
name: "chunk-elementUI", // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: "chunk-commons",
test: resolve("src/components"), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
)
});
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk("single");
});
}
}
};