This commit is contained in:
jr719 2021-04-12 00:33:06 +08:00
parent 866e452aa2
commit a7aaae03d0
9 changed files with 498 additions and 510 deletions

View File

@ -6,8 +6,8 @@
<script> <script>
export default { export default {
name: "App" name: 'App'
}; }
</script> </script>
<style> <style>
.app-container .el-button--primary { .app-container .el-button--primary {

View File

@ -60,7 +60,5 @@ export default {
padding-right: 15px; padding-right: 15px;
} }
} }
.app-breadcrumb.el-breadcrumb{
font-size: 16px !important;
}
</style> </style>

View File

@ -19,8 +19,8 @@
</template> --> </template> -->
<!-- <div class="avatar-wrapper"> --> <!-- <div class="avatar-wrapper"> -->
<img :src="avatar" class="user-avatar" /> <img :src="avatar" class="user-avatar">
<span>{{name}}</span> <span>{{ name }}</span>
<el-button icon="el-icon-switch-button" type="text" style="margin-left:26px;margin-right:20px">退出登录</el-button> <el-button icon="el-icon-switch-button" type="text" style="margin-left:26px;margin-right:20px">退出登录</el-button>
<!-- <div><i ></i>退出登录</div> --> <!-- <div><i ></i>退出登录</div> -->
<!-- <i class="el-icon-caret-bottom" /> --> <!-- <i class="el-icon-caret-bottom" /> -->
@ -54,13 +54,13 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
import Breadcrumb from "@/components/Breadcrumb"; import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from "@/components/Hamburger"; import Hamburger from '@/components/Hamburger'
import ErrorLog from "@/components/ErrorLog"; import ErrorLog from '@/components/ErrorLog'
import Screenfull from "@/components/Screenfull"; import Screenfull from '@/components/Screenfull'
import SizeSelect from "@/components/SizeSelect"; import SizeSelect from '@/components/SizeSelect'
import Search from "@/components/HeaderSearch"; import Search from '@/components/HeaderSearch'
export default { export default {
components: { components: {
@ -72,18 +72,18 @@ export default {
Search Search
}, },
computed: { computed: {
...mapGetters(["sidebar", "avatar", "device","name"]) ...mapGetters(['sidebar', 'avatar', 'device', 'name'])
}, },
methods: { methods: {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch("app/toggleSideBar"); this.$store.dispatch('app/toggleSideBar')
}, },
async logout() { async logout() {
await this.$store.dispatch("user/logout"); await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`); this.$router.push(`/login?redirect=${this.$route.fullPath}`)
} }
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -72,7 +72,7 @@ export const constantRoutes = [
}, },
{ {
path: '/', path: '/',
name:'Dashboard', name: 'Dashboard',
component: Layout, component: Layout,
redirect: '/dashboard', redirect: '/dashboard',
children: [ children: [

View File

@ -407,4 +407,4 @@ export function errorCodeMap(code) {
// : Math.floor(((timeStamp % 86400) % 3600) % 60) // : Math.floor(((timeStamp % 86400) % 3600) % 60)
// }`; // }`;
// return timeStr; // return timeStr;
// } // }

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,7 @@
type="primary" type="primary"
style="position:absolute;right:50px;top:120px" style="position:absolute;right:50px;top:120px"
@click="$router.push('/convenience/add')" @click="$router.push('/convenience/add')"
><i class="el-icon-plus" /> 直接建立工单</el-button ><i class="el-icon-plus" /> 直接建立工单</el-button>
>
<div class="title">工单列表</div> <div class="title">工单列表</div>
<div style="margin-bottom:15px;margin-top:15px" /> <div style="margin-bottom:15px;margin-top:15px" />
<el-radio-group v-model="listQuery.phase"> <el-radio-group v-model="listQuery.phase">
@ -16,20 +15,20 @@
<el-radio-button label="PROCESSING">办理中</el-radio-button> <el-radio-button label="PROCESSING">办理中</el-radio-button>
<el-radio-button label="FINISH">已办结</el-radio-button> <el-radio-button label="FINISH">已办结</el-radio-button>
</el-radio-group> </el-radio-group>
<br /> <br>
<br /> <br>
<el-radio-group v-model="listQuery.status"> <el-radio-group v-model="listQuery.status">
<el-radio-button :label="undefined">全部状态</el-radio-button> <el-radio-button :label="undefined">全部状态</el-radio-button>
<el-radio-button label="MINE">我处理</el-radio-button> <el-radio-button label="MINE">我处理</el-radio-button>
<el-radio-button label="FORWARDED">已转交</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="SUBMIT_APPLY">已提交审批</el-radio-button>
<el-radio-button label="WAIT_APPLY">待我审批</el-radio-button> <el-radio-button label="WAIT_APPLY">待我审批</el-radio-button>
</el-radio-group> </el-radio-group>
<br /> <br>
<br /> <br>
</div> </div>
<div class="convenienceList"> <div class="convenienceList">
@ -81,8 +80,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click="handleUpdate(item, 5)" @click="handleUpdate(item, 5)"
>接单</el-button >接单</el-button>
>
</p> </p>
</div> </div>
</div> </div>
@ -176,10 +174,10 @@
<script> <script>
// import Pagination from "@/components/Pagination"; // import Pagination from "@/components/Pagination";
import { list, typeList, update } from "@/api/convenience"; import { list, typeList, update } from '@/api/convenience'
import { parseTime } from "@/utils"; import { parseTime } from '@/utils'
import { staffList } from "@/api/staff"; import { staffList } from '@/api/staff'
import AliOss from "@/components/AliOSS/index.vue"; import AliOss from '@/components/AliOSS/index.vue'
export default { export default {
components: { components: {
@ -189,48 +187,48 @@ export default {
filters: { filters: {
sponsorFilter(status) { sponsorFilter(status) {
const statusMap = { const statusMap = {
SELF: "居民", SELF: '居民',
STAFF: "工作人员" STAFF: '工作人员'
}; }
return statusMap[status]; return statusMap[status]
}, },
phaseFilter(status) { phaseFilter(status) {
const statusMap = { const statusMap = {
PENDING_ORDER: "待接单", PENDING_ORDER: '待接单',
PREREQUISITES: "要件准备中", PREREQUISITES: '要件准备中',
PROCESSING: "办理中", PROCESSING: '办理中',
FINISH: "办结" FINISH: '办结'
}; }
return statusMap[status]; return statusMap[status]
}, },
statusFilter(status) { statusFilter(status) {
const statusMap = { const statusMap = {
MINE: "待我处理", MINE: '待我处理',
FORWARDED: "已转交", FORWARDED: '已转交',
FORWARDED_APPLY: "转交超限审批中", FORWARDED_APPLY: '转交超限审批中',
SUBMIT_APPLY: "提交申请", SUBMIT_APPLY: '提交申请',
WAIT_APPLY: "待审核" WAIT_APPLY: '待审核'
}; }
return statusMap[status]; return statusMap[status]
}, },
typeFilter(status) { typeFilter(status) {
const statusMap = { const statusMap = {
1: "建立工单", 1: '建立工单',
2: "撤销工单", 2: '撤销工单',
3: "沟通", 3: '沟通',
4: "调整工单类别", 4: '调整工单类别',
5: "接单", 5: '接单',
6: "要件齐备", 6: '要件齐备',
7: "办结", 7: '办结',
8: "转交超限审批提交", 8: '转交超限审批提交',
9: "转交超限审批撤销", 9: '转交超限审批撤销',
10: "转交超限审批", 10: '转交超限审批',
11: "发起审批", 11: '发起审批',
12: "撤销审批", 12: '撤销审批',
13: "审批操作", 13: '审批操作',
14: "转交" 14: '转交'
}; }
return statusMap[status]; return statusMap[status]
} }
}, },
data() { data() {
@ -261,126 +259,126 @@ export default {
}, },
msec: 0, msec: 0,
rules: { rules: {
ids: [{ required: true, message: "请选择操作对象", trigger: "change" }] ids: [{ required: true, message: '请选择操作对象', trigger: 'change' }]
}, },
timers: undefined, timers: undefined,
timersInterval:undefined timersInterval: undefined
}; }
}, },
watch: { watch: {
"listQuery.phase": { 'listQuery.phase': {
// //
handler(val) { handler(val) {
this.listQuery.phase = val; this.listQuery.phase = val
this.getList(); this.getList()
}, },
deep: true // true deep: true // true
}, },
"listQuery.status": { 'listQuery.status': {
// //
handler(val) { handler(val) {
this.listQuery.status = val; this.listQuery.status = val
this.getList(); this.getList()
}, },
deep: true // true deep: true // true
} }
}, },
created() { created() {
this.getList(); this.getList()
this.getStaffList(); this.getStaffList()
}, },
methods: { methods: {
getList() { getList() {
this.listLoading = true; this.listLoading = true
list(this.listQuery).then(res => { list(this.listQuery).then(res => {
this.list = res.d.records; this.list = res.d.records
this.listLoading = false; this.listLoading = false
clearInterval(this.timersInterval) clearInterval(this.timersInterval)
const tempData = res.d.records; const tempData = res.d.records
const now = Date.parse(new Date()).toString() / 1000; const now = Date.parse(new Date()).toString() / 1000
let arr = []; const arr = []
tempData.map((item, index) => { tempData.map((item, index) => {
// console.log(item); // console.log(item);
// PREREQUISITES: "", // PREREQUISITES: "",
// PROCESSING: "", // PROCESSING: "",
// FINISH: "" // FINISH: ""
let msec = []; let msec = []
let obj = {}; let obj = {}
switch (item.phase) { switch (item.phase) {
case "PENDING_ORDER": case 'PENDING_ORDER':
// //
// console.log(item.createDate) // console.log(item.createDate)
// this.timers[index]++; // this.timers[index]++;
msec = now - item.createDate; msec = now - item.createDate
// msec++; // msec++;
// console.log(msec); // console.log(msec);
obj = { obj = {
time: msec, time: msec,
phase: item.phase phase: item.phase
}; }
arr.push(obj); arr.push(obj)
break; break
case "PREREQUISITES": case 'PREREQUISITES':
// //
// console.log(index); // console.log(index);
// console.log(now); // console.log(now);
// console.log(item.createDate); // console.log(item.createDate);
// console.log(item.acceptanceTime); // console.log(item.acceptanceTime);
// console.log(now - item.createDate - item.acceptanceTime); // console.log(now - item.createDate - item.acceptanceTime);
msec = now - item.createDate - item.acceptanceTime; msec = now - item.createDate - item.acceptanceTime
obj = { obj = {
time: msec, time: msec,
phase: item.phase phase: item.phase
}; }
arr.push(obj); arr.push(obj)
break; break
case "PROCESSING": case 'PROCESSING':
// //
msec = msec =
now - now -
item.createDate - item.createDate -
item.acceptanceTime - item.acceptanceTime -
item.prerequisitesTime; item.prerequisitesTime
obj = { obj = {
time: msec, time: msec,
phase: item.phase phase: item.phase
}; }
arr.push(obj); arr.push(obj)
break; break
case "FINISH": case 'FINISH':
msec = msec =
item.acceptanceTime + item.prerequisitesTime + item.finishTime; item.acceptanceTime + item.prerequisitesTime + item.finishTime
obj = { obj = {
time: msec, time: msec,
phase: item.phase phase: item.phase
}; }
arr.push(obj); arr.push(obj)
// //
break; break
default: default:
// console.log("default"); // console.log("default");
break; break
} }
}); })
// console.log(arr); // console.log(arr);
this.timersInterval = setInterval(() => { this.timersInterval = setInterval(() => {
// console.log(arr); // console.log(arr);
if (arr.length > 0) { if (arr.length > 0) {
arr.map(item => { arr.map(item => {
if (item.phase !== "FINISH") { if (item.phase !== 'FINISH') {
item.time++; item.time++
} }
}); })
} }
this.timers = arr; this.timers = arr
}, 1000); }, 1000)
}); })
}, },
getTypeList() { getTypeList() {
typeList().then(res => { typeList().then(res => {
// console.log(res); // console.log(res);
}); })
}, },
getStaffList() { getStaffList() {
staffList().then(res => { staffList().then(res => {
@ -388,10 +386,10 @@ export default {
const obj = { const obj = {
label: item.name, label: item.name,
value: item.id value: item.id
}; }
this.staffOptions.push(obj); this.staffOptions.push(obj)
}); })
}); })
}, },
handleTypeChange() {}, handleTypeChange() {},
resetPayload() { resetPayload() {
@ -403,79 +401,79 @@ export default {
attachmentList: undefined, attachmentList: undefined,
approve: undefined, approve: undefined,
evaluation: undefined evaluation: undefined
}; }
}, },
handleUpdate(row, type) { handleUpdate(row, type) {
this.resetPayload(); this.resetPayload()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.applyForm.clearValidate(); this.$refs.applyForm.clearValidate()
}); })
this.updateType = type; this.updateType = type
this.payload.id = row.id; this.payload.id = row.id
this.payload.version = row.version; this.payload.version = row.version
this.payload.type = type; this.payload.type = type
switch (type) { switch (type) {
case 5: case 5:
this.applyDialog = true; this.applyDialog = true
break; break
case 6: case 6:
this.applyDialog = true; this.applyDialog = true
break; break
case 11: case 11:
this.applyDialog = true; this.applyDialog = true
break; break
case 13: case 13:
this.applyDialog = true; this.applyDialog = true
break; break
case 14: case 14:
this.applyDialog = true; this.applyDialog = true
break; break
default: default:
this.updateData(); this.updateData()
break; break
} }
}, },
updateData() { updateData() {
update(this.payload).then(res => { update(this.payload).then(res => {
if (res.c === 200) { if (res.c === 200) {
this.$notify.success("操作成功"); this.$notify.success('操作成功')
this.getList(); this.getList()
} }
}); })
}, },
apply() { apply() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.applyForm.validate(valid => { this.$refs.applyForm.validate(valid => {
if (valid) { if (valid) {
this.updateData(); this.updateData()
this.applyDialog = false; this.applyDialog = false
} }
}); })
}, 100); }, 100)
}, },
handleFilterPhase(phase, event) { handleFilterPhase(phase, event) {
// console.log(event.target.tagName==='SPAN'); // console.log(event.target.tagName==='SPAN');
if (event.target.tagName === "SPAN") { if (event.target.tagName === 'SPAN') {
event.target.parentElement.setAttribute( event.target.parentElement.setAttribute(
"class", 'class',
"el-button el-button--" + 'el-button el-button--' +
(phase === undefined ? "primary" : "default") + (phase === undefined ? 'primary' : 'default') +
" el-button--medium is-round" ' el-button--medium is-round'
); )
} else { } else {
event.target.setAttribute( event.target.setAttribute(
"class", 'class',
"el-button el-button--" + 'el-button el-button--' +
(phase === undefined ? "primary" : "default") + (phase === undefined ? 'primary' : 'default') +
" el-button--medium is-round" ' el-button--medium is-round'
); )
} }
this.listQuery.phase = phase; this.listQuery.phase = phase
this.getList(); this.getList()
}, },
handleFilterStatus(status) { handleFilterStatus(status) {
this.listQuery.status = status; this.listQuery.status = status
this.getList(); this.getList()
}, },
handlePreview() {}, handlePreview() {},
handleRemove() {}, handleRemove() {},
@ -484,24 +482,24 @@ export default {
timeFormat(timeStamp) { timeFormat(timeStamp) {
const timeStr = `${ const timeStr = `${
Math.floor(timeStamp / 3600) < 9 Math.floor(timeStamp / 3600) < 9
? "0" + Math.floor(timeStamp / 3600) ? '0' + Math.floor(timeStamp / 3600)
: Math.floor(timeStamp / 3600) : Math.floor(timeStamp / 3600)
}:${ }:${
Math.floor(((timeStamp % 86400) % 3600) / 60) < 9 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)
}:${ }:${
Math.floor(((timeStamp % 86400) % 3600) % 60) < 9 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)
}`; }`
return timeStr; return timeStr
}, },
countdown(index, status) { countdown(index, status) {
// //
} }
} }
}; }
</script> </script>
<style scope> <style scope>

View File

@ -135,7 +135,7 @@ export default {
otherQuery: {}, otherQuery: {},
codeText: '获取验证码', codeText: '获取验证码',
time: 5, time: 5,
getCodeDisabled:false getCodeDisabled: false
} }
}, },
watch: { watch: {
@ -254,7 +254,7 @@ export default {
}, {}) }, {})
}, },
handleSms() { handleSms() {
this.getCodeDisabled=false; this.getCodeDisabled = false
const payload = { const payload = {
phone: this.loginForm.username, phone: this.loginForm.username,
category: 'SIGNIN' category: 'SIGNIN'
@ -268,7 +268,7 @@ export default {
} }
}).then(res => { }).then(res => {
if (res.data.c === 200) { if (res.data.c === 200) {
this.getCodeDisabled=true; this.getCodeDisabled = true
this.timer() this.timer()
this.$notify({ this.$notify({
title: '成功', title: '成功',
@ -287,7 +287,7 @@ export default {
if (this.time === 0) { if (this.time === 0) {
this.time = 5 this.time = 5
this.codeText = '获取验证码' this.codeText = '获取验证码'
this.getCodeDisabled=false this.getCodeDisabled = false
clearInterval(interval) clearInterval(interval)
} }
}, 1000) }, 1000)

View File

@ -4,7 +4,7 @@
<div class="workBookLayout"> <div class="workBookLayout">
<div class="title">工作手册管理</div> <div class="title">工作手册管理</div>
<div class="text-center"style="padding:10% 0"> <div class="text-center"style="padding:10% 0">
<img class="img" src="./img/comingSoon.png" alt="" /> <img class="img" src="./img/comingSoon.png" alt="">
<h2>业务正在努力开发中...</h2> <h2>业务正在努力开发中...</h2>
<div style="color:#787878">该功能即将上线请稍等</div> <div style="color:#787878">该功能即将上线请稍等</div>
</div> </div>
@ -58,8 +58,8 @@
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import Pagination from '@/components/Pagination'
import { workBookList } from "@/api/workBook"; import { workBookList } from '@/api/workBook'
export default { export default {
components: { Pagination }, components: { Pagination },
@ -73,20 +73,20 @@ export default {
size: 10, size: 10,
keyword: undefined keyword: undefined
} }
}; }
}, },
created() { created() {
this.getList(); this.getList()
}, },
methods: { methods: {
getList() { getList() {
workBookList(this.listQuery).then(res => { workBookList(this.listQuery).then(res => {
console.log(res); console.log(res)
this.list = res.d.records; this.list = res.d.records
}); })
} }
} }
}; }
</script> </script>
<style scoped> <style scoped>