This commit is contained in:
jiangrui 2021-04-15 09:46:52 +08:00
parent 924d620b02
commit 73ca8c141d
47 changed files with 375 additions and 1239 deletions

View File

@ -2,5 +2,5 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://api.rt.myntv.cn/'

View File

@ -1,6 +1,6 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb class="app-breadcrumb" separator="/" v-if="levelList[0].meta.title!=='首页'">
<transition-group name="breadcrumb" >
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
@ -42,19 +42,20 @@ export default {
);
const first = matched[0];
if (!this.isDashboard(first)) {
matched = [{ path: "/dashboard", meta: { title: "首页" } }].concat(
matched
);
}
// if (!this.isDashboard(first)) {
// matched = [{ path: "/dashboard", meta: { title: "" } }].concat(
// matched
// );
// }
this.levelList = matched.filter(
item => item.meta && item.meta.title && item.meta.breadcrumb !== false
);
// console.log(this.levelList);
if (this.levelList.length > 1) {
this.levelList.splice(0, 1);
}
// if(first.)
// console.log(first.meta.title);
// if (this.levelList.length > 1) {
// this.levelList.splice(0, 1);
// }
},
isDashboard(route) {
const name = route && route.name;

View File

@ -27,7 +27,7 @@ export default {
},
methods: {
linkProps(to) {
console.log(to);
// console.log(to);
if (this.isExternal) {
return {
href: to,

View File

@ -3,7 +3,7 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.parentTitle?onlyOneChild.meta.parentTitle:onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 807 B

View File

@ -1,26 +0,0 @@
export default {
computed: {
device() {
return this.$store.state.app.device
}
},
mounted() {
// In order to fix the click on menu on the ios device will trigger the mouseleave bug
// https://github.com/PanJiaChen/vue-element-admin/issues/1135
this.fixBugIniOS()
},
methods: {
fixBugIniOS() {
const $subMenu = this.$refs.subMenu
if ($subMenu) {
const handleMouseleave = $subMenu.handleMouseleave
$subMenu.handleMouseleave = (e) => {
if (this.device === 'mobile') {
return
}
handleMouseleave(e)
}
}
}
}
}

View File

@ -1,61 +0,0 @@
<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
if (icon) {
if (icon.includes('el-icon')) {
vnodes.push(<i class={[icon, 'sub-el-icon']} />)
} else {
vnodes.push(
<div
class='menuIcon'
style='width:53px;height:53px;background:#9cbeff;border-radius:22px;display:flex;align-items: center;justify-content: center;'
>
<svg-icon icon-class={icon} />
</div>
)
// vnodes.push(<svg-icon icon-class={icon}/>)
}
}
if (title) {
vnodes.push(<span slot='title'>{title}</span>)
}
return vnodes
}
}
</script>
<style scoped>
.sub-el-icon {
color: currentColor;
width: 1em;
height: 1em;
/* width: 53px; */
/* height: 53px; */
}
#app .sidebar-container .svg-icon {
margin-right: 0;
}
/* .menuitem {
} */
/* .menuIcon .svg-icon{
margin-left: 0;
} */
</style>

View File

@ -1,43 +0,0 @@
<template>
<component :is="type" v-bind="linkProps(to)">
<slot />
</component>
</template>
<script>
import { isExternal } from '@/utils/validate'
export default {
props: {
to: {
type: String,
required: true
}
},
computed: {
isExternal() {
return isExternal(this.to)
},
type() {
if (this.isExternal) {
return 'a'
}
return 'router-link'
}
},
methods: {
linkProps(to) {
if (this.isExternal) {
return {
href: to,
target: '_blank',
rel: 'noopener'
}
}
return {
to: to
}
}
}
}
</script>

View File

@ -1,82 +0,0 @@
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title">{{ title }} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title">{{ title }} </h1>
</router-link>
</transition>
</div>
</template>
<script>
export default {
name: 'SidebarLogo',
props: {
collapse: {
type: Boolean,
required: true
}
},
data() {
return {
title: '定点服务系统',
logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
}
}
}
</script>
<style lang="scss" scoped>
.sidebarLogoFade-enter-active {
transition: opacity 1.5s;
}
.sidebarLogoFade-enter,
.sidebarLogoFade-leave-to {
opacity: 0;
}
.sidebar-logo-container {
position: relative;
width: 100%;
height: 50px;
line-height: 50px;
background: #2b2f3a;
text-align: center;
overflow: hidden;
& .sidebar-logo-link {
height: 100%;
width: 100%;
& .sidebar-logo {
width: 32px;
height: 32px;
vertical-align: middle;
margin-right: 12px;
}
& .sidebar-title {
display: inline-block;
margin: 0;
color: #fff;
font-weight: 600;
line-height: 50px;
font-size: 14px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
}
&.collapse {
.sidebar-logo {
margin-right: 0px;
}
}
}
</style>

View File

@ -1,95 +0,0 @@
<template>
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
</template>
<sidebar-item
v-for="child in item.children"
:key="child.path"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
</el-submenu>
</div>
</template>
<script>
import path from 'path'
import { isExternal } from '@/utils/validate'
import Item from './Item'
import AppLink from './Link'
import FixiOSBug from './FixiOSBug'
export default {
name: 'SidebarItem',
components: { Item, AppLink },
mixins: [FixiOSBug],
props: {
// route object
item: {
type: Object,
required: true
},
isNest: {
type: Boolean,
default: false
},
basePath: {
type: String,
default: ''
}
},
data() {
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
// TODO: refactor with render function
this.onlyOneChild = null
return {}
},
methods: {
hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item
return true
}
})
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
return true
}
return false
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath
}
if (isExternal(this.basePath)) {
return this.basePath
}
return path.resolve(this.basePath, routePath)
}
}
}
</script>

View File

@ -1,63 +0,0 @@
<template>
<div :class="{'has-logo':showLogo}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="false"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
export default {
components: { SidebarItem, Logo },
computed: {
...mapGetters([
'permission_routes',
'sidebar'
]),
activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
}
}
}
</script>
<style scoped>
/* .el-menu-item {
height: 153px;
justify-content: center;
display: flex;
flex-direction: column;
align-items: center;
} */
</style>

View File

@ -1,16 +1,16 @@
import Vue from 'vue'
import Router from 'vue-router'
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router)
Vue.use(Router);
/* Layout */
import Layout from '@/layout'
import Layout from "@/layout";
/* Router Modules */
import componentsRouter from './modules/components'
import chartsRouter from './modules/charts'
import tableRouter from './modules/table'
import nestedRouter from './modules/nested'
import componentsRouter from "./modules/components";
import chartsRouter from "./modules/charts";
import tableRouter from "./modules/table";
import nestedRouter from "./modules/nested";
/**
* Note: sub-menu only appear when route children.length >= 1
@ -40,106 +40,121 @@ import nestedRouter from './modules/nested'
*/
export const constantRoutes = [
{
path: '/redirect',
path: "/redirect",
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index')
path: "/redirect/:path(.*)",
component: () => import("@/views/redirect/index")
}
]
},
{
path: '/login',
component: () => import('@/views/login/index'),
path: "/login",
component: () => import("@/views/login/index"),
hidden: true
},
{
path: '/auth-redirect',
component: () => import('@/views/login/auth-redirect'),
path: "/auth-redirect",
component: () => import("@/views/login/auth-redirect"),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error-page/404'),
path: "/404",
component: () => import("@/views/error-page/404"),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error-page/401'),
path: "/401",
component: () => import("@/views/error-page/401"),
hidden: true
},
{
path: '/',
name: 'Dashboard',
path: "/",
name: "Dashboard",
component: Layout,
redirect: '/dashboard',
redirect: "/dashboard",
children: [
{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
name: 'Dashboard',
meta: { title: '首页', icon: 'statistical', affix: true }
path: "dashboard",
component: () => import("@/views/dashboard/index"),
name: "Dashboard",
meta: { title: "首页", icon: "statistical", affix: true }
}
]
},
{
path: '/convenience',
path: "/convenience",
component: Layout,
name: 'Convenience',
redirect: '/convenience/list',
name: "Convenience",
redirect: "/convenience/list",
meta: {
title: '工单管理',
icon: 'convenience',
roles: ['admin', 'editor']
title: "工单管理",
icon: "convenience",
roles: ["admin", "editor"]
},
children: [
{
path: 'list',
component: () => import('@/views/convenience/list'),
name: 'ConvenienceList',
meta: { title: '工单列表', icon: 'convenience', affix: true }
path: "list",
component: () => import("@/views/convenience/list"),
name: "ConvenienceList",
meta: {
title: "工单列表",
icon: "convenience",
affix: true,
parentTitle: "工单管理"
}
},
{
path: 'add',
component: () => import('@/views/convenience/add'),
name: 'ConvenienceList',
meta: { title: '创建工单', icon: 'convenience', affix: true },
path: "add",
component: () => import("@/views/convenience/add"),
name: "ConvenienceList",
meta: { title: "创建工单", icon: "convenience", affix: true },
hidden: true
},
{
path: 'detail',
component: () => import('@/views/convenience/detail'),
name: 'ConvenienceDetail',
meta: { title: '工单详情', icon: 'convenience', affix: true ,activeMenu:'/convenience/list'},
path: "detail",
component: () => import("@/views/convenience/detail"),
name: "ConvenienceDetail",
meta: {
title: "工单详情",
icon: "convenience",
affix: true,
activeMenu: "/convenience/list"
},
hidden: true
},
{
path: 'typeList',
component: () => import('@/views/convenience/typeList'),
name: 'ConvenienceTypeList',
meta: { title: '工单类型列表', icon: 'convenience', affix: true },
path: "typeList",
component: () => import("@/views/convenience/typeList"),
name: "ConvenienceTypeList",
meta: { title: "工单类型列表", icon: "convenience", affix: true },
hidden: true
}
]
},
{
path: '/workBook',
path: "/workBook",
component: Layout,
name: 'WorkBook',
redirect: '/workBook/list',
name: "WorkBook",
redirect: "/workBook/list",
meta: {
title: '工作手册',
icon: 'list',
roles: ['admin', 'editor']
title: "工作手册管理",
icon: "list",
roles: ["admin", "editor"]
},
children: [
{
path: 'list',
component: () => import('@/views/workBook/list'),
name: 'workBookList',
meta: { title: '工作手册列表', icon: 'workBook', affix: true }
path: "list",
component: () => import("@/views/workBook/list"),
name: "workBookList",
meta: {
title: "工作手册列表",
icon: "workBook",
affix: true,
parentTitle: "工作手册管理"
}
}
]
}
@ -200,7 +215,7 @@ export const constantRoutes = [
// }
// ]
// }
]
];
/**
* asyncRoutes
@ -462,22 +477,22 @@ export const asyncRoutes = [
// },
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }
]
{ path: "*", redirect: "/404", hidden: true }
];
const createRouter = () =>
new Router({
// mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
});
const router = createRouter()
const router = createRouter();
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
const newRouter = createRouter();
router.matcher = newRouter.matcher; // reset router
}
export default router
export default router;

View File

@ -20,8 +20,7 @@
</el-form-item>
<el-form-item label="办事项目">
<!-- <el-input v-model="convenience.eventTypeId"></el-input> -->
<el-cascader
<!-- <el-cascader
v-model="convenience.eventTypeId"
:options="typeOptions"
:show-all-levels="false"
@ -29,7 +28,16 @@
placeholder="选择大项目"
style="width:100%"
clearable
/>
/> -->
<el-select v-model="convenience.eventTypeId" placeholder="请选择">
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.eventName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="文字说明">
@ -43,22 +51,6 @@
<el-form-item label="附件">
<AliOss v-model="convenience.attachment" multiple />
<!-- <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" plain>点击上传</el-button>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png文件且不超过500kb
</div>
</el-upload> -->
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleAdd">创建工单</el-button>
@ -72,30 +64,12 @@ import { add, typeList } from "@/api/convenience";
import { info } from "@/api/staff";
import AliOss from "@/components/AliOSS/index.vue";
// import Pagination from "@/components/Pagination";
// import { list, typeList } from "@/api/convenience";
// import { parseTime } from "@/utils";
export default {
components: {
AliOss
},
data() {
var checkInfo = (rule, value, callback) => {
// console.log(value);
// if (value === undefined) {
// console.log('if');
// return callback(new Error(""));
// } else {
// console.log('else');
// info({ param: this.searchInput || undefined }).then(res => {
// if (!res.d) {
// return callback(new Error(""));
// } else {
// this.convenience.residentInformation = res.d.id;
// }
// });
// }
if (value === "") {
callback(new Error("受理人不能为空"));
// console.log('value==<>');
@ -135,24 +109,25 @@ export default {
methods: {
getTypeList() {
typeList().then(res => {
this.typeOptions = [];
res.d.map(i => {
const children = [];
// this.typeOptions = [];
this.typeOptions = res.d
// res.d.map(i => {
// const children = [];
i.eventTypesList.map(c => {
const level2 = {
label: c.eventName,
value: c.id
};
children.push(level2);
});
const level1 = {
label: i.eventName,
children
};
// i.eventTypesList.map(c => {
// const level2 = {
// label: c.eventName,
// value: c.id
// };
// children.push(level2);
// });
// const level1 = {
// label: i.eventName,
// children
// };
this.typeOptions.push(level1);
});
// this.typeOptions.push(level1);
// });
});
},
handleAdd() {

View File

@ -1,9 +1,5 @@
<template>
<div class="app-container" style="padding-top:0">
<!-- <div class="filter-container">
</div> -->
<!-- <el-card class="box-card" shadow="never"> -->
<div class="recordLayout">
<div style="border-left:5px solid #1890ff;padding-left:5px">工单详情</div>
@ -16,7 +12,7 @@
convenience && convenience.eventType.eventName
}}</span>
<el-cascader
<!-- <el-cascader
ref="cascader"
v-else
v-model="convenience.eventType.id"
@ -25,7 +21,23 @@
:props="{ emitPath: false }"
placeholder="编辑"
@change="handleEventTypeChange"
/>
/> -->
<el-select
ref="eventTypeRef"
v-model="convenience.eventType.id"
placeholder="请选择"
@change="handleEventTypeChange"
v-else
>
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.eventName"
:value="item.id"
>
</el-option>
</el-select>
<el-button
v-if="
convenience &&
@ -35,49 +47,13 @@
convenience.statusList[0].status !== 'FORWARDED_APPLY' &&
convenience.statusList[0].status !== 'FORWARDED'
"
icon="el-icon-edit"
type="text"
style="font-size:16px"
@click="cascader"
>{{ isEventTypeChange ? "取消" : "编辑" }}</el-button
><i class="icon_edit"/>{{ isEventTypeChange ? "取消" : "编辑" }}</el-button
>
<!-- <i class="icon_timer"></i
><span class="text_timer">
{{
`${
this.totalTime.hour > 9
? this.totalTime.hour
: this.totalTime.hour
}:${
this.totalTime.minute > 9
? this.totalTime.minute
: this.totalTime.minute
}:${
this.totalTime.second > 9
? this.totalTime.second
: this.totalTime.second
}`
}}
</span> -->
<!-- {{
`${
this.totalTime.hour > 9
? this.totalTime.hour
: "0" + this.totalTime.hour
}:${
this.totalTime.minute > 9
? this.totalTime.minute
: "0" + this.totalTime.minute
}:${
this.totalTime.second > 9
? this.totalTime.second
: "0" + this.totalTime.second
}`
}} -->
</div>
<div style="color:#787878;font-size:14px;">
<!-- <el-tag type="danger" style="color:#ff5f40;background:#ffe0da">{{
convenience && convenience.phase | phaseFilter
}}</el-tag> -->
{{ convenience && convenience.sponsor | sponsorFilter }}创建于{{
convenience &&
convenience.createDate | parseTime("{y}-{m}-{d} {h}:{i}:{s}")
@ -87,22 +63,7 @@
}}</el-tag>
</div>
</div>
<!-- style="display: flex;flex-direction: row;justify-content: center;width: 25%;" -->
<div>
<!-- <el-button
v-if="
convenience &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status !== 'WAIT_APPLY' &&
convenience.statusList[0].status !== 'SUBMIT_APPLY' &&
convenience.statusList[0].status !== 'FORWARDED_APPLY' &&
convenience.statusList[0].status !== 'FORWARDED'
"
type="primary"
@click="handleChangeEventType"
>编辑</el-button
> -->
<!-- v-if="convenience && convenience.phase === 'PENDING_ORDER'" -->
<el-button
v-if="convenience && convenience.phase === 'PENDING_ORDER'"
style="margin-right:16px"
@ -175,19 +136,8 @@
<el-row :gutter="20" style="color:#787878;margin-bottom:30px">
<el-col :span="6">
<div>流水号{{ convenience && convenience.serialNumber }}</div>
<!-- <div>
创建人{{ convenience && convenience.sponsor | sponsorFilter }}
</div> -->
</el-col>
<!-- <el-col :span="6">
<div>
创建时间{{
convenience &&
convenience.createDate | parseTime("{y}-{m}-{d} {h}:{i}:{s}")
}}
</div>
</el-col
> -->
<el-col :span="6"
><div>
申办人{{ convenience && convenience.residentInformation.name }}
@ -224,29 +174,6 @@
:gutter="20"
style="color:#787878;display: flex;align-items: center;"
>
<!-- <el-col :span="6">
任务阶段{{ convenience && convenience.phase | phaseFilter }}
</el-col> -->
<!-- <el-col :span="6">
总办理时长<i class="icon_timer" /><span class="text_timer">
{{
`${
this.totalTime.hour > 9
? this.totalTime.hour
: this.totalTime.hour
}:${
this.totalTime.minute > 9
? this.totalTime.minute
: this.totalTime.minute
}:${
this.totalTime.second > 9
? this.totalTime.second
: this.totalTime.second
}`
}}
</span>
</el-col> -->
<el-col
:span="6"
style="display: flex;align-items: center;flex-direction:column"
@ -287,17 +214,7 @@
>撤回</el-button
>
</el-popover>
<!-- <el-button
v-if="
convenience &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status === 'SUBMIT_APPLY'
"
type="primary"
style="margin-left:10px"
@click="handleUpdate(12)"
>撤销</el-button
> -->
<el-button
v-if="
convenience &&
@ -326,111 +243,6 @@
>
</div>
</div>
<!-- <ul v-if="convenience" class="approveUl">
<li v-for="(item, index) in convenience.applyVoList" :key="index">
<el-tag type="info" style="display: flex;align-items: center;"
><i
:class="{
icon_approve: true,
approve_pass: item.approve,
approve_null: item.approve === null,
approve_no: !item.approve
}"
/>{{
`${item.residentInformation.name}${
item.approve
? "已同意"
: item.approve === null
? "审批中"
: "已驳回"
}`
}}</el-tag
>
</li>
</ul> -->
<!-- <div>
<span
>(审批人:{{
convenience &&
convenience.applyVoList[0].residentInformation.name
}})</span
>
</div> -->
<!-- <div
v-if="
convenience && convenience.statusList[0].status === 'WAIT_APPLY'
"
style="margin-left:10px"
>
<el-button type="success" @click="handleApprove(true)"
>通过</el-button
><el-button type="danger" @click="handleApprove(false)"
>驳回</el-button
>
</div> -->
<!-- <div
v-if="
convenience &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status === 'FORWARDED_APPLY' &&
convenience &&
convenience.applyType === 'FORWARDED'
"
>
<span
>(审批人:{{
convenience &&
convenience.applyVoList[0].residentInformation.name
}})</span
>
<el-button
style="margin-left:10px"
type="primary"
@click="handleUpdate(9)"
>撤销转交审批</el-button
>
</div>
<div
v-if="
convenience &&
convenience.phase !== 'FINISH' &&
convenience.statusList[0].status === 'SUBMIT_APPLY'
"
style="margin-left:10px"
> -->
<!-- <el-popover
placement="bottom-start"
title=""
width="410"
trigger="click"
>
<ul class="approveUl">
<li
v-for="(item, index) in convenience.applyVoList"
:key="index"
>
<i
:class="{
icon_approve: true,
approve_pass: item.approve,
approve_null: item.approve === null,
approve_no: !item.approve
}"
/>{{ item.residentInformation.name }}
</li>
</ul>
<el-button
type="primary"
style="position:relative;left:155px;"
@click="handleUpdate(12)"
>撤销</el-button
>
<el-link slot="reference" type="primary">查看审批详情</el-link>
</el-popover> -->
<!-- </div> -->
</el-col>
<el-col
:span="6"
@ -479,45 +291,6 @@
</ul>
</el-col>
</el-row>
<!-- <div style="margin-top:32px;color:#787878">
<el-row :gutter="20" style="color:#787878">
<el-col :span="6"
><div style="display: flex;align-items: center;">
任务状态{{
convenience && convenience.statusList[0].status | statusFilter
}}
<div
style="margin-left:10px"
v-if="
convenience &&
convenience.statusList[0].status === 'WAIT_APPLY'
"
>
<el-button type="primary" @click="handleApprove(true)"
>通过</el-button
><el-button type="danger" @click="handleApprove(false)"
>驳回</el-button
>
</div>
</div></el-col
>
<el-col
:span="6"
style="display:flex"
v-if="convenience && convenience.evaluation"
><div>
办事评价
{{ convenience && convenience.evaluation | evaluationFilter }}
</div>
<el-button
type="primary"
style="position: relative;top: -10px;left: 20px;"
@click="handleUpdate(16)"
>我要申诉</el-button
></el-col
>
</el-row>
</div> -->
<el-row class="text-center acceptanceOptionsLayout">
<el-col :span="8">
@ -577,14 +350,6 @@
: this.prerequisitesTime.second
}`
}}</span>
<!-- <span
v-if="acceptanceMsec > 57600 && acceptanceMsec < 86400"
class="timeout"
><i class="icon_timeout" />即将超时</span
>
<span v-if="acceptanceMsec > 86400" class="timeout"
><i class="icon_timeout" />已超时</span
> -->
</div>
</div>
</el-col>
@ -621,11 +386,6 @@
}`
}}
</span>
<!-- {{
finishMsec +
":" +
convenience&&convenience.eventType.commitmentTimeLimit * 3600
}} -->
<span
v-if="
finishMsec >=
@ -648,116 +408,8 @@
</div>
</el-col>
</el-row>
<!-- <div class="acceptanceOptionsLayout">
<div>
<i class="a_times icon_acceptance"></i>
<p>受理</p>
<p class="text_left">承诺时长 24小时内</p>
<p>
实际时长
<span class="duration">{{
`${
this.acceptanceTime.hour > 9
? this.acceptanceTime.hour
: this.acceptanceTime.hour
}:${
this.acceptanceTime.minute > 9
? this.acceptanceTime.minute
: this.acceptanceTime.minute
}:${
this.acceptanceTime.second > 9
? this.acceptanceTime.second
: this.acceptanceTime.second
}`
}}</span
><span
class="timeout"
v-if="acceptanceMsec > 57600 && acceptanceMsec < 86400"
><i class="icon_timeout"></i>即将超时</span
>
<span class="timeout" v-if="acceptanceMsec > 86400"
><i class="icon_timeout"></i>已超时</span
>
</p>
</div>
<div style="padding: 0px 23%;">
<i class="a_times icon_prepare"></i>
<p>要件准备</p>
<p class="text_left">承诺时长 尽快</p>
<p class="text_left">
实际时长
<span>{{
`${
this.prerequisitesTime.hour > 9
? this.prerequisitesTime.hour
: this.prerequisitesTime.hour
}:${
this.prerequisitesTime.minute > 9
? this.prerequisitesTime.minute
: this.prerequisitesTime.minute
}:${
this.prerequisitesTime.second > 9
? this.prerequisitesTime.second
: this.prerequisitesTime.second
}`
}}</span>
</p>
</div>
<div>
<i class="a_times icon_finish"></i>
<p>办结</p>
<p class="text_left">
承诺时长
{{
convenience && convenience.eventType.commitmentTimeLimit
}}小时内
</p>
<p class="text_left">
法定时长
{{ convenience && convenience.eventType.legalTimeLimit }}小时内
</p>
<p class="text_left">
实际时长
<span class="duration">
{{
`${
this.finishTime.hour > 9
? this.finishTime.hour
: this.finishTime.hour
}:${
this.finishTime.minute > 9
? this.finishTime.minute
: this.finishTime.minute
}:${
this.finishTime.second > 9
? this.finishTime.second
: this.finishTime.second
}`
}}
</span>
<span
class="timeout"
v-if="
finishMsec >= convenience &&
convenience.eventType.commitmentTimeLimit * 3600
"
><i class="icon_timeout"></i>已超时</span
>
<span
class="timeout"
v-else-if="
finishMsec >= convenience &&
convenience.eventType.timeoutReminder * 3600
"
><i class="icon_timeout"></i>即将超时</span
>
</p>
</div>
</div> -->
</div>
</div>
<!-- </el-card> -->
<div class="recordLayout">
<div style="border-left:5px solid #1890ff;padding-left:5px;float: left;">
@ -804,17 +456,10 @@
<h3>{{ item.content }}</h3>
<p v-if="item.type === 11">审批人{{ getNames(item.to) }}</p>
<p v-if="item.type === 3">
被沟通人{{ getNames(item.to) }}
<!-- <span v-for="item in item.to" :key="item.id">{{
getNames(item.to)
}}</span> -->
</p>
<p
v-for="(attachment, index) in item.attachmentList"
:key="index"
>
<!-- url.substr(url.lastIndexOf(".") + 1) -->
<span
v-if="
isAssetTypeAnImage(
@ -850,19 +495,22 @@
<span
v-if="item.type === 14 || item.type === 8"
style="margin-left:164px"
>被转交人{{ item.to[0].name }}</span
>被转交人{{
item.type === 14
? item.to[0].name
: item.type === 8
? item.to[1].name
: item.to[0].name
}}</span
>
</p>
<!-- <p v-if="item.type === 14 || item.type === 8">
被转交人{{ item.to[0].name }}
</p> -->
<p v-if="item.type === 8">
转交超限审批人{{ item.to[0].name }}
</p>
<p v-if="item.type === 1">
办事项目{{ convenience && convenience.eventType.eventName }}
</p>
<p v-if="item.remark">
<p v-if="item.remark && item.type !== 4">
{{
item.type === 11
? "审批备注:"
@ -873,6 +521,11 @@
: "备注:"
}}{{ item.remark }}
</p>
<p
style="line-height:25px"
v-if="item.type === 4"
v-html="item.remark.replace(/\n/g, '<br/>')"
></p>
</el-card>
</el-timeline-item>
</el-timeline>
@ -902,7 +555,7 @@
:rules="rules"
:model="payload"
>
<el-form-item label="选择被沟通人" prop="ids">
<!-- <el-form-item label="选择被沟通人" prop="ids">
<el-select
v-model="payload.ids"
multiple
@ -916,7 +569,7 @@
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="请输入沟通内容" prop="remark">
<el-input
v-model="payload.remark"
@ -1043,28 +696,6 @@
>
</span>
</el-dialog>
<!-- <el-dialog
title="编辑办事项目"
:visible.sync="dialogEventType"
width="30%"
center
>
<div>
<el-cascader
v-model="eventTypeId"
:options="typeOptions"
:show-all-levels="false"
:props="{ emitPath: false }"
placeholder="选择办事项目"
style="width:100%"
clearable
/>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="eventTypeUpdate">变更</el-button>
</span>
</el-dialog> -->
</div>
</template>
@ -1136,7 +767,6 @@ export default {
};
return statusMap[status];
}
// 1 , 2 , 3
},
components: {
AliOss
@ -1159,7 +789,6 @@ export default {
},
rules: {
ids: [{ required: true, message: "请选择操作对象", trigger: "change" }]
// category: [{ required: true, message: '', trigger: 'change' }]
},
updateType: undefined,
communicationOptions: [],
@ -1219,7 +848,6 @@ export default {
this.convenience = res.d;
const tempData = Object.assign({}, this.convenience);
const now = Date.parse(new Date()).toString() / 1000;
// console.log(now);
clearInterval(this.acceptanceInterval);
clearInterval(this.prerequisitesInterval);
clearInterval(this.finishTimeInterval);
@ -1259,7 +887,6 @@ export default {
break;
//
case "FINISH":
// console.log(123);
if (tempData.finishTime !== null) {
this.finishMsec = tempData.finishTime;
this.acceptanceMsec = tempData.acceptanceTime;
@ -1272,62 +899,29 @@ export default {
}
break;
}
// const now = Date.parse(new Date()).toString() / 1000;
// switch (this.convenience.phase) {
// case "PENDING_ORDER":
// if (this.convenience.acceptanceTime === null) {
// this.acceptanceMsec = now - this.convenience.createDate;
// } else {
// this.acceptanceMsec = this.convenience.acceptanceTime;
// }
// this.countdown("PENDING_ORDER");
// break;
// case "PREREQUISITES":
// if (this.convenience.prerequisitesTime === null) {
// this.preMsec = now - this.convenience.createDate;
// } else {
// this.preMsec = this.convenience.prerequisitesTime;
// }
// this.countdown("PREREQUISITES");
// break;
// case "PROCESSING":
// if (this.convenience.finishTime === null) {
// this.finishMsec =
// now - this.preMsec - this.convenience.createDate;
// } else {
// this.finishMsec = this.convenience.finishTime;
// }
// this.countdown("PROCESSING");
// break;
// default:
// this.acceptanceMsec = this.convenience.acceptanceTime;
// this.preMsec = this.convenience.prerequisitesTime;
// this.finishMsec = this.convenience.finishTime;
// this.countdown(this.convenience.phase);
// break;
// }
});
},
getTypeList() {
typeList().then(res => {
this.typeOptions = [];
res.d.map(i => {
const children = [];
this.typeOptions = res.d;
// this.typeOptions = [];
// res.d.map(i => {
// const children = [];
i.eventTypesList.map(c => {
const level2 = {
label: c.eventName,
value: c.id
};
children.push(level2);
});
const level1 = {
label: i.eventName,
children
};
// i.eventTypesList.map(c => {
// const level2 = {
// label: c.eventName,
// value: c.id
// };
// children.push(level2);
// });
// const level1 = {
// label: i.eventName,
// children
// };
this.typeOptions.push(level1);
});
// this.typeOptions.push(level1);
// });
});
},
countdown(phase) {
@ -1354,7 +948,6 @@ export default {
}, 1000);
} else if (phase === "PROCESSING") {
this.finishTimeInterval = setInterval(() => {
// console.log(233);
this.timeFormat("finishTime", this.finishMsec);
this.finishMsec++;
}, 1000);
@ -1368,124 +961,13 @@ export default {
this.totalMsec++;
}, 1000);
} else if (phase === "FINISH") {
// console.log(233);
this.finishMsec;
this.totalMsec =
this.convenience.acceptanceTime +
this.convenience.prerequisitesTime +
this.convenience.finishTime;
this.timeFormat("totalTime", this.totalMsec);
// this.totalTimeInterval = setInterval(() => {
// this.totalMsec++;
// }, 1000);
} else {
// FINISHtotal
// this.totalTimeInterval = setInterval(() => {
// this.timeFormat(this.totalTime, this.totalMsec);
// this.totalMsec++;
// }, 1000);
}
// if (phase === "PENDING_ORDER") {
// //
// if (this.convenience.acceptanceTime === null) {
// this.acceptanceInterval = setInterval(() => {
// this.acceptanceTime.hour = Math.floor(this.acceptanceMsec / 3600);
// this.acceptanceTime.minute = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) / 60
// );
// this.acceptanceTime.second = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) % 60
// );
// this.totalTime = this.acceptanceTime;
// this.acceptanceMsec++;
// }, 1000);
// } else {
// this.acceptanceTime.hour = Math.floor(this.acceptanceMsec / 3600);
// this.acceptanceTime.minute = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) / 60
// );
// this.acceptanceTime.second = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) % 60
// );
// }
// } else if (phase === "PREREQUISITES") {
// //
// if (this.convenience.prerequisitesTime === null) {
// this.prerequisitesInterval = setInterval(() => {
// this.prerequisitesTime.hour = Math.floor(this.preMsec / 3600);
// this.prerequisitesTime.minute = Math.floor(
// ((this.preMsec % 86400) % 3600) / 60
// );
// this.prerequisitesTime.second = Math.floor(
// ((this.preMsec % 86400) % 3600) % 60
// );
// // this.totalTime = this.acceptanceTime;
// this.totalMsec = this.acceptanceMsec + this.preMsec;
// this.totalTime.hour = Math.floor(this.totalMsec / 3600);
// this.totalTime.minute = Math.floor(
// ((this.totalMsec % 86400) % 3600) / 60
// );
// this.totalTime.second = Math.floor(
// ((this.totalMsec % 86400) % 3600) % 60
// );
// this.preMsec++;
// }, 1000);
// } else {
// this.prerequisitesTime.hour = Math.floor(this.preMsec / 3600);
// this.prerequisitesTime.minute = Math.floor(
// ((this.preMsec % 86400) % 3600) / 60
// );
// this.prerequisitesTime.second = Math.floor(
// ((this.preMsec % 86400) % 3600) % 60
// );
// }
// } else if (phase === "PROCESSING") {
// //
// if (this.convenience.finishTime === null) {
// this.finishTimeInterval = setInterval(() => {
// this.finishTime.hour = Math.floor(this.finishMsec / 3600);
// this.finishTime.minute = Math.floor(
// ((this.finishMsec % 86400) % 3600) / 60
// );
// this.finishTime.second = Math.floor(
// ((this.finishMsec % 86400) % 3600) % 60
// );
// this.finishMsec++;
// }, 1000);
// } else {
// this.finishTime.hour = Math.floor(this.finishMsec / 3600);
// this.finishTime.minute = Math.floor(
// ((this.finishMsec % 86400) % 3600) / 60
// );
// this.finishTime.second = Math.floor(
// ((this.finishMsec % 86400) % 3600) % 60
// );
// console.log(this.convenience.finishTime);
// }
// } else {
// this.acceptanceTime.hour = Math.floor(this.acceptanceMsec / 3600);
// this.acceptanceTime.minute = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) / 60
// );
// this.acceptanceTime.second = Math.floor(
// ((this.acceptanceMsec % 86400) % 3600) % 60
// );
// this.prerequisitesTime.hour = Math.floor(this.preMsec / 3600);
// this.prerequisitesTime.minute = Math.floor(
// ((this.preMsec % 86400) % 3600) / 60
// );
// this.prerequisitesTime.second = Math.floor(
// ((this.preMsec % 86400) % 3600) % 60
// );
// this.finishTime.hour = Math.floor(this.finishMsec / 3600);
// this.finishTime.minute = Math.floor(
// ((this.finishMsec % 86400) % 3600) / 60
// );
// this.finishTime.second = Math.floor(
// ((this.finishMsec % 86400) % 3600) % 60
// );
// }
},
timeFormat(obj, timeStamp) {
this[obj].hour =
@ -1675,7 +1157,8 @@ export default {
break;
case 16:
//
this.applyDialog = true;
// this.applyDialog = true;
this.$notify.warning('功能尚未开发完成,敬请期待')
break;
default:
this.updateData();
@ -1683,8 +1166,6 @@ export default {
}
},
handleEventTypeChange(val) {
// console.log(val);
// handle
this.payload = {
id: this.id,
type: 4,
@ -1693,10 +1174,9 @@ export default {
};
this.updateType = 4;
this.updateData();
// this.dialogEventType = false;
},
handleChange(val) {
// console.log(val);
// console.log(val1);
},
apply() {
// this.$refs.updateForm.validate(valid=>{
@ -1791,11 +1271,14 @@ export default {
},
cascader() {
this.isEventTypeChange = !this.isEventTypeChange;
this.$nextTick(() => {
console.log(this.$refs.cascader)
const tempRef = this.$refs.cascader;
tempRef.$el.style.display='inline-block'
this.$refs.cascader.focusFirstNode()
const tempRef = this.$refs.eventTypeRef;
console.log(tempRef);
if(tempRef)
tempRef.toggleMenu();
// tempRef.$el.style.display = "inline-block";
// this.$refs.eventTypeRef.focusFirstNode();
}, 100);
}
},
@ -1805,22 +1288,6 @@ export default {
clearInterval(this.finishTimeInterval);
next();
}
// timeFormat(timeStamp) {
// const timeStr = `${
// Math.floor(timeStamp / 3600) < 9
// ? "0" + Math.floor(timeStamp / 3600)
// : Math.floor(timeStamp / 3600)
// }:${
// Math.floor(((timeStamp % 86400) % 3600) / 60) < 9
// ? "0" + Math.floor(((timeStamp % 86400) % 3600) / 60)
// : Math.floor(((timeStamp % 86400) % 3600) / 60)
// }:${
// Math.floor(((timeStamp % 86400) % 3600) % 60) < 9
// ? "0" + Math.floor(((timeStamp % 86400) % 3600) % 60)
// : Math.floor(((timeStamp % 86400) % 3600) % 60)
// }`;
// return timeStr;
// }
};
</script>
@ -2075,6 +1542,15 @@ h3 {
margin-right: 6px;
vertical-align: top;
}
.icon_edit{
background: url("./img/icon_edit.png") no-repeat;
width: 16px;
height: 16px;
display: inline-block;
background-size: cover;
margin-right: 3px;
vertical-align: top;
}
.icon_sh {
background: url("./img/icon_sh.png") no-repeat;
width: 19px;
@ -2132,5 +1608,4 @@ h3 {
/* .el-cascader-panel{
display: -webkit-inline-box;
} */
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 390 B

View File

@ -5,7 +5,8 @@
type="primary"
style="position:absolute;right:50px;margin-top:80px"
@click="$router.push('/convenience/add')"
><i class="el-icon-plus" /> 直接建立工单</el-button>
><i class="el-icon-plus" /> 直接建立工单</el-button
>
<div class="title">工单列表</div>
<div style="margin-bottom:15px;margin-top:15px" />
<el-radio-group v-model="listQuery.phase">
@ -15,20 +16,20 @@
<el-radio-button label="PROCESSING">办理中</el-radio-button>
<el-radio-button label="FINISH">已办结</el-radio-button>
</el-radio-group>
<br>
<br>
<br />
<br />
<el-radio-group v-model="listQuery.status">
<el-radio-button :label="undefined">全部状态</el-radio-button>
<el-radio-button label="MINE">我处理</el-radio-button>
<el-radio-button label="FORWARDED">已转交</el-radio-button>
<el-radio-button
label="FORWARDED_APPLY"
>转交超限审批中</el-radio-button>
<el-radio-button label="FORWARDED_APPLY"
>转交超限审批中</el-radio-button
>
<el-radio-button label="SUBMIT_APPLY">已提交审批</el-radio-button>
<el-radio-button label="WAIT_APPLY">待我审批</el-radio-button>
</el-radio-group>
<br>
<br>
<br />
<br />
</div>
<div class="convenienceList" v-loading="listLoading">
@ -206,10 +207,10 @@
<script>
// import Pagination from "@/components/Pagination";
import { list, typeList, update } from '@/api/convenience'
import { parseTime } from '@/utils'
import { staffList } from '@/api/staff'
import AliOss from '@/components/AliOSS/index.vue'
import { list, typeList, update } from "@/api/convenience";
import { parseTime } from "@/utils";
import { staffList } from "@/api/staff";
import AliOss from "@/components/AliOSS/index.vue";
export default {
components: {
@ -226,12 +227,12 @@ export default {
},
phaseFilter(status) {
const statusMap = {
PENDING_ORDER: '待接单',
PREREQUISITES: '要件准备中',
PROCESSING: '办理中',
FINISH: '办结'
}
return statusMap[status]
PENDING_ORDER: "待接单",
PREREQUISITES: "要件准备中",
PROCESSING: "办理中",
FINISH: "办结"
};
return statusMap[status];
},
statusFilter(status) {
const statusMap = {
@ -245,22 +246,22 @@ export default {
},
typeFilter(status) {
const statusMap = {
1: '建立工单',
2: '撤销工单',
3: '沟通',
4: '调整工单类别',
5: '接单',
6: '要件齐备',
7: '办结',
8: '转交超限审批提交',
9: '转交超限审批撤销',
10: '转交超限审批',
11: '发起审批',
12: '撤销审批',
13: '审批操作',
14: '转交'
}
return statusMap[status]
1: "建立工单",
2: "撤销工单",
3: "沟通",
4: "调整工单类别",
5: "接单",
6: "要件齐备",
7: "办结",
8: "转交超限审批提交",
9: "转交超限审批撤销",
10: "转交超限审批",
11: "发起审批",
12: "撤销审批",
13: "审批操作",
14: "转交"
};
return statusMap[status];
}
},
data() {
@ -291,37 +292,37 @@ export default {
},
msec: 0,
rules: {
ids: [{ required: true, message: '请选择操作对象', trigger: 'change' }]
ids: [{ required: true, message: "请选择操作对象", trigger: "change" }]
},
timers: undefined,
timersInterval: undefined
}
};
},
watch: {
'listQuery.phase': {
"listQuery.phase": {
//
handler(val) {
this.listQuery.phase = val
this.getList()
this.listQuery.phase = val;
this.getList();
},
deep: true // true
},
'listQuery.status': {
"listQuery.status": {
//
handler(val) {
this.listQuery.status = val
this.getList()
this.listQuery.status = val;
this.getList();
},
deep: true // true
}
},
created() {
this.getList()
this.getStaffList()
this.getList();
this.getStaffList();
},
methods: {
getList() {
this.listLoading = true
this.listLoading = true;
list(this.listQuery).then(res => {
this.list = res.d.records;
this.listLoading = false;
@ -331,97 +332,133 @@ export default {
// console.log(now);
const arr = [];
tempData.map((item, index) => {
let msec = []
let obj = {}
let msec = [];
let obj = {};
switch (item.phase) {
case 'PENDING_ORDER':
case "PENDING_ORDER":
//
msec = now - item.createDate
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
}
arr.push(obj)
break
case 'PREREQUISITES':
};
arr.push(obj);
break;
case "PREREQUISITES":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
}
arr.push(obj)
break
case 'PROCESSING':
};
arr.push(obj);
break;
case "PROCESSING":
//
msec = now - item.createDate;
obj = {
time: msec,
phase: item.phase,
status: null
}
arr.push(obj)
break
case 'FINISH':
};
arr.push(obj);
break;
case "FINISH":
msec =
item.acceptanceTime + item.prerequisitesTime + item.finishTime
item.acceptanceTime + item.prerequisitesTime + item.finishTime;
obj = {
time: msec,
phase: item.phase,
status: null
}
arr.push(obj)
};
arr.push(obj);
//
break
break;
default:
break
break;
}
})
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.phase !== "FINISH") {
item.time++;
if (this.list[index].phase === "PENDING_ORDER") {
if (item.status == null) {
if (item.time > 57600) {
item.status = false
item.status = false;
if (item.time >= 86400) {
item.status = true
item.status = true;
}
}
}
}
if (this.list[index].phase === 'PROCESSING') {
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
item.status = false;
if (
item.time >=
this.list[index].eventType.commitmentTimeLimit * 3600
) {
item.status = true
item.status = true;
}
}
}
}
}
})
});
}
this.timers = arr
}, 1000)
})
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);
});
},
getTypeList() {
typeList().then(res => {
// console.log(res);
})
});
},
getStaffList() {
staffList().then(res => {
@ -429,10 +466,10 @@ export default {
const obj = {
label: item.name,
value: item.id
}
this.staffOptions.push(obj)
})
})
};
this.staffOptions.push(obj);
});
});
},
handleTypeChange() {},
resetPayload() {
@ -444,79 +481,79 @@ export default {
attachmentList: undefined,
approve: undefined,
evaluation: undefined
}
};
},
handleUpdate(row, type) {
this.resetPayload()
this.resetPayload();
this.$nextTick(() => {
this.$refs.applyForm.clearValidate()
})
this.updateType = type
this.payload.id = row.id
this.payload.version = row.version
this.payload.type = type
this.$refs.applyForm.clearValidate();
});
this.updateType = type;
this.payload.id = row.id;
this.payload.version = row.version;
this.payload.type = type;
switch (type) {
case 5:
this.applyDialog = true
break
this.applyDialog = true;
break;
case 6:
this.applyDialog = true
break
this.applyDialog = true;
break;
case 11:
this.applyDialog = true
break
this.applyDialog = true;
break;
case 13:
this.applyDialog = true
break
this.applyDialog = true;
break;
case 14:
this.applyDialog = true
break
this.applyDialog = true;
break;
default:
this.updateData()
break
this.updateData();
break;
}
},
updateData() {
update(this.payload).then(res => {
if (res.c === 200) {
this.$notify.success('操作成功')
this.getList()
this.$notify.success("操作成功");
this.getList();
}
})
});
},
apply() {
this.$nextTick(() => {
this.$refs.applyForm.validate(valid => {
if (valid) {
this.updateData()
this.applyDialog = false
this.updateData();
this.applyDialog = false;
}
})
}, 100)
});
}, 100);
},
handleFilterPhase(phase, event) {
// console.log(event.target.tagName==='SPAN');
if (event.target.tagName === 'SPAN') {
if (event.target.tagName === "SPAN") {
event.target.parentElement.setAttribute(
'class',
'el-button el-button--' +
(phase === undefined ? 'primary' : 'default') +
' el-button--medium is-round'
)
"class",
"el-button el-button--" +
(phase === undefined ? "primary" : "default") +
" el-button--medium is-round"
);
} else {
event.target.setAttribute(
'class',
'el-button el-button--' +
(phase === undefined ? 'primary' : 'default') +
' el-button--medium is-round'
)
"class",
"el-button el-button--" +
(phase === undefined ? "primary" : "default") +
" el-button--medium is-round"
);
}
this.listQuery.phase = phase
this.getList()
this.listQuery.phase = phase;
this.getList();
},
handleFilterStatus(status) {
this.listQuery.status = status
this.getList()
this.listQuery.status = status;
this.getList();
},
handlePreview() {},
handleRemove() {},
@ -525,18 +562,18 @@ export default {
timeFormat(timeStamp) {
const timeStr = `${
Math.floor(timeStamp / 3600) < 9
? '0' + Math.floor(timeStamp / 3600)
? "0" + Math.floor(timeStamp / 3600)
: Math.floor(timeStamp / 3600)
}:${
Math.floor(((timeStamp % 86400) % 3600) / 60) < 9
? '0' + Math.floor(((timeStamp % 86400) % 3600) / 60)
? "0" + Math.floor(((timeStamp % 86400) % 3600) / 60)
: Math.floor(((timeStamp % 86400) % 3600) / 60)
}:${
Math.floor(((timeStamp % 86400) % 3600) % 60) < 9
? '0' + Math.floor(((timeStamp % 86400) % 3600) % 60)
? "0" + Math.floor(((timeStamp % 86400) % 3600) % 60)
: Math.floor(((timeStamp % 86400) % 3600) % 60)
}`
return timeStr
}`;
return timeStr;
},
countdown(index, status) {
//
@ -554,7 +591,7 @@ export default {
// return statusEl;
// }
}
}
};
</script>
<style scope>

View File

@ -29,7 +29,9 @@
</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><span style="float:right">更新时间{{new Date() | parseTime}}</span></el-col>
<el-col
v-for="(value, key, index) in statisticalData"
:key="index"
@ -58,6 +60,7 @@
<script>
import CountTo from "vue-count-to";
import {parseTime} from '@/utils'
import { statisticalData } from "@/api/statisticalData";
export default {
@ -95,7 +98,7 @@ export default {
} else {
str = value;
}
console.log(str);
// console.log(str);
return str
},
timeFormat(timeStamp) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -120,8 +120,8 @@ export default {
// password: '111111'
// },
loginForm: {
username: '18882564006',
captcha: '111111',
username: '',
captcha: '',
appVersion: '1.0.0',
system: 'IOS',
device: navigator.userAgent,
@ -142,7 +142,7 @@ export default {
redirect: undefined,
otherQuery: {},
codeText: '获取验证码',
time: 5,
time: 60,
getCodeDisabled: false
}
},
@ -296,7 +296,7 @@ export default {
this.time--
this.codeText = `${this.time}s 后重新获取`
if (this.time === 0) {
this.time = 5
this.time = 60
this.codeText = '获取验证码'
this.getCodeDisabled = false
clearInterval(interval)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -58,7 +58,7 @@
</template>
<script>
// import Pagination from '@/components/Pagination'
import Pagination from '@/components/Pagination'
import { workBookList } from '@/api/workBook'
export default {