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>
export default {
name: "App"
};
name: 'App'
}
</script>
<style>
.app-container .el-button--primary {

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,7 @@
type="primary"
style="position:absolute;right:50px;top:120px"
@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">
@ -16,20 +15,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">
@ -81,8 +80,7 @@
type="primary"
size="mini"
@click="handleUpdate(item, 5)"
>接单</el-button
>
>接单</el-button>
</p>
</div>
</div>
@ -176,10 +174,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: {
@ -189,48 +187,48 @@ export default {
filters: {
sponsorFilter(status) {
const statusMap = {
SELF: "居民",
STAFF: "工作人员"
};
return statusMap[status];
SELF: '居民',
STAFF: '工作人员'
}
return statusMap[status]
},
phaseFilter(status) {
const statusMap = {
PENDING_ORDER: "待接单",
PREREQUISITES: "要件准备中",
PROCESSING: "办理中",
FINISH: "办结"
};
return statusMap[status];
PENDING_ORDER: '待接单',
PREREQUISITES: '要件准备中',
PROCESSING: '办理中',
FINISH: '办结'
}
return statusMap[status]
},
statusFilter(status) {
const statusMap = {
MINE: "待我处理",
FORWARDED: "已转交",
FORWARDED_APPLY: "转交超限审批中",
SUBMIT_APPLY: "提交申请",
WAIT_APPLY: "待审核"
};
return statusMap[status];
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];
1: '建立工单',
2: '撤销工单',
3: '沟通',
4: '调整工单类别',
5: '接单',
6: '要件齐备',
7: '办结',
8: '转交超限审批提交',
9: '转交超限审批撤销',
10: '转交超限审批',
11: '发起审批',
12: '撤销审批',
13: '审批操作',
14: '转交'
}
return statusMap[status]
}
},
data() {
@ -261,126 +259,126 @@ 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;
this.list = res.d.records
this.listLoading = false
clearInterval(this.timersInterval)
const tempData = res.d.records;
const now = Date.parse(new Date()).toString() / 1000;
let arr = [];
const tempData = res.d.records
const now = Date.parse(new Date()).toString() / 1000
const arr = []
tempData.map((item, index) => {
// console.log(item);
// PREREQUISITES: "",
// PROCESSING: "",
// FINISH: ""
let msec = [];
let obj = {};
let msec = []
let obj = {}
switch (item.phase) {
case "PENDING_ORDER":
case 'PENDING_ORDER':
//
// console.log(item.createDate)
// this.timers[index]++;
msec = now - item.createDate;
msec = now - item.createDate
// msec++;
// console.log(msec);
obj = {
time: msec,
phase: item.phase
};
}
arr.push(obj);
break;
case "PREREQUISITES":
arr.push(obj)
break
case 'PREREQUISITES':
//
// console.log(index);
// console.log(now);
// console.log(item.createDate);
// console.log(item.acceptanceTime);
// console.log(now - item.createDate - item.acceptanceTime);
msec = now - item.createDate - item.acceptanceTime;
msec = now - item.createDate - item.acceptanceTime
obj = {
time: msec,
phase: item.phase
};
arr.push(obj);
break;
case "PROCESSING":
}
arr.push(obj)
break
case 'PROCESSING':
//
msec =
now -
item.createDate -
item.acceptanceTime -
item.prerequisitesTime;
item.prerequisitesTime
obj = {
time: msec,
phase: item.phase
};
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
};
arr.push(obj);
}
arr.push(obj)
//
break;
break
default:
// console.log("default");
break;
break
}
});
})
// console.log(arr);
this.timersInterval = setInterval(() => {
// console.log(arr);
if (arr.length > 0) {
arr.map(item => {
if (item.phase !== "FINISH") {
item.time++;
if (item.phase !== 'FINISH') {
item.time++
}
});
})
}
this.timers = arr;
}, 1000);
});
this.timers = arr
}, 1000)
})
},
getTypeList() {
typeList().then(res => {
// console.log(res);
});
})
},
getStaffList() {
staffList().then(res => {
@ -388,10 +386,10 @@ export default {
const obj = {
label: item.name,
value: item.id
};
this.staffOptions.push(obj);
});
});
}
this.staffOptions.push(obj)
})
})
},
handleTypeChange() {},
resetPayload() {
@ -403,79 +401,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() {},
@ -484,24 +482,24 @@ 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) {
//
}
}
};
}
</script>
<style scope>

View File

@ -254,7 +254,7 @@ export default {
}, {})
},
handleSms() {
this.getCodeDisabled=false;
this.getCodeDisabled = false
const payload = {
phone: this.loginForm.username,
category: 'SIGNIN'
@ -268,7 +268,7 @@ export default {
}
}).then(res => {
if (res.data.c === 200) {
this.getCodeDisabled=true;
this.getCodeDisabled = true
this.timer()
this.$notify({
title: '成功',

View File

@ -4,7 +4,7 @@
<div class="workBookLayout">
<div class="title">工作手册管理</div>
<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>
<div style="color:#787878">该功能即将上线请稍等</div>
</div>
@ -58,8 +58,8 @@
</template>
<script>
import Pagination from "@/components/Pagination";
import { workBookList } from "@/api/workBook";
import Pagination from '@/components/Pagination'
import { workBookList } from '@/api/workBook'
export default {
components: { Pagination },
@ -73,20 +73,20 @@ export default {
size: 10,
keyword: undefined
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
getList() {
workBookList(this.listQuery).then(res => {
console.log(res);
this.list = res.d.records;
});
console.log(res)
this.list = res.d.records
})
}
}
}
};
</script>
<style scoped>