|
@@ -1,6 +1,12 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
- <save-form inline :model="search" @submit="FetchList" @reset="reset" saveKey="/main/main/reminders">
|
|
|
+ <save-form
|
|
|
+ inline
|
|
|
+ :model="search"
|
|
|
+ @submit="FetchList"
|
|
|
+ @reset="reset"
|
|
|
+ saveKey="/main/main/reminders"
|
|
|
+ >
|
|
|
<el-form-item prop="organIds">
|
|
|
<el-select
|
|
|
clearable
|
|
@@ -8,99 +14,147 @@
|
|
|
placeholder="请选择分部"
|
|
|
v-model="search.organId"
|
|
|
>
|
|
|
- <el-option v-for="(item,index) in selects.branchs"
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
<el-button native-type="reset" type="danger">重置</el-button>
|
|
|
</save-form>
|
|
|
- <empty desc="暂无需要处理异常" v-if="!list.length"/>
|
|
|
- <el-button @click="handle(item)"
|
|
|
- style="width: 100%;color: #303133;"
|
|
|
- v-else
|
|
|
- v-for="(item, index) in list"
|
|
|
- :key="index"
|
|
|
- :disabled="item.result ? !item.result.length : !item.result" type="text"
|
|
|
- >
|
|
|
- <title-item
|
|
|
- type="warning"
|
|
|
- :data="[{name: item.desc, num: item.num,errorType:item.errorType}]"
|
|
|
+ <empty desc="暂无需要处理异常" v-if="!list.length" />
|
|
|
+ <div v-else class="buttonWrap">
|
|
|
+ <el-button
|
|
|
+ @click="handle(item)"
|
|
|
+ style="width: 100%; color: #303133"
|
|
|
+ v-for="(item, index) in list"
|
|
|
+ :key="index"
|
|
|
+ :disabled="item.num ? false : true"
|
|
|
+ type="text"
|
|
|
>
|
|
|
- <span style="color: #14928A;" v-if='!errorType[item.errorType] || (errorType[item.errorType] && permission(errorType[item.errorType].permission))'>立即处理<i class="el-icon-d-arrow-right"/></span>
|
|
|
- </title-item>
|
|
|
- </el-button>
|
|
|
+ <title-item
|
|
|
+ type="warning"
|
|
|
+ :data="[
|
|
|
+ { name: item.desc, num: item.num, errorType: item.errorType },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style="color: #14928a"
|
|
|
+ v-if="
|
|
|
+ !errorType[item.errorType] ||
|
|
|
+ (errorType[item.errorType] &&
|
|
|
+ permission(errorType[item.errorType].permission))
|
|
|
+ "
|
|
|
+ >立即处理<i class="el-icon-d-arrow-right"
|
|
|
+ /></span>
|
|
|
+ </title-item>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { Searchs } from '@/helpers'
|
|
|
-import { getRemindMatterData } from '@/views/main/api'
|
|
|
-import title from '../abnormal/title'
|
|
|
-import { errorType } from '@/views/main/constant'
|
|
|
-import { permission } from '@/utils/directivePage'
|
|
|
+import { Searchs } from "@/helpers";
|
|
|
+import { getRemindMatterData } from "@/views/main/api";
|
|
|
+import title from "../abnormal/title";
|
|
|
+import { errorType } from "@/views/main/constant";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
const initSearch = {
|
|
|
- organId: null
|
|
|
-}
|
|
|
+ organId: null,
|
|
|
+};
|
|
|
export default {
|
|
|
components: {
|
|
|
- 'title-item': title
|
|
|
+ "title-item": title,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
search: {
|
|
|
- ...initSearch
|
|
|
+ ...initSearch,
|
|
|
},
|
|
|
list: [],
|
|
|
errorType: errorType,
|
|
|
- }
|
|
|
+ listByType: {},
|
|
|
+ };
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.FetchList()
|
|
|
- this.$store.dispatch('setBranchs')
|
|
|
+ this.FetchList();
|
|
|
+ this.$store.dispatch("setBranchs");
|
|
|
},
|
|
|
methods: {
|
|
|
permission,
|
|
|
handle(item) {
|
|
|
// 添加判断权限
|
|
|
- if(errorType[item.errorType] && !this.permission(errorType[item.errorType]?.permission)) {
|
|
|
- return
|
|
|
+ if (
|
|
|
+ errorType[item.errorType] &&
|
|
|
+ !this.permission(errorType[item.errorType]?.permission)
|
|
|
+ ) {
|
|
|
+ return;
|
|
|
}
|
|
|
- new Searchs().removeByKey('/teamList')
|
|
|
+ new Searchs().removeByKey(item.url);
|
|
|
this.$router.push({
|
|
|
- path: '/teamList',
|
|
|
+ path: item.url,
|
|
|
query: {
|
|
|
+ ...item.query,
|
|
|
filter_type: item.errorType,
|
|
|
- searchType: 'WAIT_CREATE_PAYMENT_CALENDER',
|
|
|
organId: this.search.organId || undefined,
|
|
|
- form: 'reminders'
|
|
|
- }
|
|
|
- })
|
|
|
+ [item.resultKey]: item.resultKey
|
|
|
+ ? (item.result || []).join(",")
|
|
|
+ : undefined,
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ // this.$router.push({
|
|
|
+ // path: "/teamList",
|
|
|
+ // query: {
|
|
|
+ // filter_type: item.errorType,
|
|
|
+ // searchType: "WAIT_CREATE_PAYMENT_CALENDER",
|
|
|
+ // organId: this.search.organId || undefined,
|
|
|
+ // form: "reminders",
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
async FetchList() {
|
|
|
try {
|
|
|
const res = await getRemindMatterData({
|
|
|
- ...this.search
|
|
|
- })
|
|
|
- this.list = res.data
|
|
|
- } catch (error) {}
|
|
|
+ ...this.search,
|
|
|
+ });
|
|
|
+ this.list = this.formatData(res.data||[])
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
},
|
|
|
reset() {
|
|
|
- this.search = {...initSearch}
|
|
|
- this.FetchList()
|
|
|
+ this.search = { ...initSearch };
|
|
|
+ this.FetchList();
|
|
|
},
|
|
|
- }
|
|
|
-}
|
|
|
+ formatData(data) {
|
|
|
+ let list = data.map(item=>{
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ ...errorType[item.errorType] || {}
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ return list
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
- .container{
|
|
|
- /deep/ .is-disabled {
|
|
|
- .title{
|
|
|
- >span{
|
|
|
- color: #C0C4CC!important;
|
|
|
- }
|
|
|
+.container {
|
|
|
+ /deep/ .is-disabled {
|
|
|
+ .title {
|
|
|
+ > span {
|
|
|
+ color: #c0c4cc !important;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .buttonWrap {
|
|
|
+ .el-button + .el-button {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|