Browse Source

修复首页显示数据

dev-xx
qb 8 months ago
parent
commit
6cfecfd6fb
  1. 45
      src/views/distribution/artery/abnormalList.vue
  2. 24
      src/views/wel/index1.vue

45
src/views/distribution/artery/abnormalList.vue

@ -136,7 +136,6 @@
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"
:drawerShow="drawerShow"
v-model="details.columnList"
@ -158,6 +157,9 @@ import {
deepClone,
handleClearTableQuery,
getObjType,
handleSelectQuery,
handleInputQuery,
handleTranslationDataSeclect,
} from '@/utils/util';
import { columnList } from '@/option/distribution/abnormalList';
import { useRouter } from 'vue-router';
@ -297,19 +299,7 @@ const onLoad = async (page?: any, params = {}) => {
if (code !== 200) return;
details.data = data.records;
const valueArr = details.columnList.filter(val => val.type === 3);
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
for (let index = 0; index < valueArr.length; index++) {
const item = valueArr[index];
const label = item.prop.replace('Name', '');
value[item.prop] =
(item.checkarr.find(val => Number(val.value) === Number(value[label])) || {}).label ||
value[label];
}
}
handleTranslationDataSeclect(details.data, details.columnList);
details.page.total = data.total;
} catch (error) {
@ -349,7 +339,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
handleInputQuery(index, row, details.query);
onLoad(details.page);
};
@ -368,12 +358,7 @@ const timesc = (index, row) => {
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.query[row.prop] = index;
if (!index && index !== 0) delete details.query[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
handleSelectQuery(index, row, details.query);
onLoad(details.page);
};
@ -394,24 +379,6 @@ const currentChange = current => {
onLoad();
};
/**
* 设置列表 -- 固定函数
* 弹窗的勾选回调用于更改头部数组
* 固定搭配只需要更换 columnList
* */
const setnewcolum = (newarr, headarr, type) => {
if (type == 1) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'checkList', headarr);
} else if (type == 2) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'flexList', headarr);
} else if (type == 3) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'sortlist', headarr);
}
};
/** 弹出层开启前清除数据 */
const beforeClose = done => {
done();

24
src/views/wel/index1.vue

@ -769,11 +769,7 @@
<div class="text_center" v-if="signforData_status !== '1'">
<div class="data_box red mb10">
<div class="data mr5px">
{{
signforData.clerkOverTimeScale
? Number(signforData.clerkOverTimeScale * 100).toFixed(2)
: 0
}}
{{ signforData.clerkOverTimeScale || 0 }}
</div>
<div class="">%</div>
</div>
@ -906,9 +902,7 @@
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">
{{
billSignforData.signScale ? Number(billSignforData.signScale * 100).toFixed(2) : 0
}}
{{ billSignforData.signScale || 0 }}
</div>
<div class="">%</div>
</div>
@ -930,11 +924,7 @@
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">
{{
billSignforData.clerkSignforScale
? Number(billSignforData.clerkSignforScale * 100).toFixed(2)
: 0
}}
{{ billSignforData.clerkSignforScale || 0 }}
</div>
<div class="">%</div>
</div>
@ -956,11 +946,7 @@
<div class="text_center" v-if="billSignforData_status !== '3'">
<div class="data_box red mb10">
<div class="data mr5px">
{{
billSignforData.clerkOverTimeScale
? Number(billSignforData.clerkOverTimeScale * 100).toFixed(2)
: 0
}}
{{ billSignforData.clerkOverTimeScale || 0 }}
</div>
<div class="">%</div>
</div>
@ -1349,6 +1335,8 @@ const billSignforData = computed(() => {
2
);
console.log('_obj :>> ', _obj);
return _obj;
});
</script>

Loading…
Cancel
Save