Browse Source

人员类别

shibei_master
jiangyy 4 years ago
parent
commit
8264ffa359
  1. 68
      src/views/modules/visual/basicinfo/personCategory/components/screen-loading/index.vue
  2. 18
      src/views/modules/visual/basicinfo/personCategory/index.vue
  3. 51
      src/views/modules/visual/basicinfo/personCategory/recordList.vue

68
src/views/modules/visual/basicinfo/personCategory/components/screen-loading/index.vue

@ -1,68 +0,0 @@
<template>
<div class="screen-loading">
<svg width="50px"
height="50px">
<circle cx="25"
cy="25"
r="20"
fill="transparent"
stroke-width="3"
stroke-dasharray="31.415, 31.415"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="0, 25 25;360, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#02bcfe;#3be6cb;#02bcfe"
dur="3s"
repeatCount="indefinite" />
</circle>
<circle cx="25"
cy="25"
r="10"
fill="transparent"
stroke-width="3"
stroke-dasharray="15.7, 15.7"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="360, 25 25;0, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#3be6cb;#02bcfe;#3be6cb"
dur="3s"
repeatCount="indefinite" />
</circle>
</svg>
<div class="loading-tip">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'DvLoading'
}
</script>
<style lang="scss" scoped>
.screen-loading {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.loading-tip {
font-size: 14px;
color: #fff;
}
}
</style>

18
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -1,5 +1,6 @@
<template> <template>
<div class="warning-box"> <div @click="hiddenTypeList()"
class="warning-box">
<cpt-card> <cpt-card>
<div class="title"> <div class="title">
<img src="@/assets/img/shuju/title-tip.png" /> <img src="@/assets/img/shuju/title-tip.png" />
@ -80,7 +81,7 @@
<script> <script>
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import screenTable from "./components/screen-table/index"; import screenTable from "./recordList";
import cptCard from "@/views/modules/visual/cpts/card"; import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick"; import nextTick from "dai-js/tools/nextTick";
@ -133,12 +134,16 @@ export default {
}, },
methods: { methods: {
hiddenTypeList () {
this.$refs.ref_recordlist.hiddenTypeList()
},
async getApiData () { async getApiData () {
// //
await this.getCategoryData() await this.getCategoryData()
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
initData () { initData () {
@ -183,7 +188,7 @@ export default {
this.pageNo = 1; this.pageNo = 1;
this.categoryKey = item.categoryKey this.categoryKey = item.categoryKey
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
// //
@ -221,12 +226,11 @@ export default {
pageSizeChangeHandleNew (val) { pageSizeChangeHandleNew (val) {
this.pageNo = 1; this.pageNo = 1;
this.pageSize = val; this.pageSize = val;
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
pageCurrentChangeHandleNew (val) { pageCurrentChangeHandleNew (val) {
this.pageNo = val; this.pageNo = val;
this.getUserwarnlist(); this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
}, },
watch: { watch: {

51
src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue → src/views/modules/visual/basicinfo/personCategory/recordList.vue

@ -15,10 +15,10 @@
{{ '调整时间' }} {{ '调整时间' }}
</div> </div>
<div class="table-header-th table-header-select" <div class="table-header-th table-header-select"
style="width:10%" style="width:10%">
@click.stop="handleShowType()"> <span @click.stop="handleShowType()">{{ typeShow }}</span>
<span>{{ typeShow }}</span> <img @click.stop="handleShowType()"
<img src="@/assets/img/xiala.png" /> src="@/assets/img/xiala.png" />
<div class="user_list" <div class="user_list"
v-show="showTypeSelect"> v-show="showTypeSelect">
@ -61,7 +61,7 @@
<screen-loading v-if="visibleLoading">加载中</screen-loading> <screen-loading v-if="visibleLoading">加载中</screen-loading>
<div class="no-data" <div class="no-data"
v-if="tableData.length == 0 && !visibleLoading"> v-if="tableData.length == 0 && !visibleLoading">
<img src="../../../../../../../assets/img/modules/visual/noData.png" <img src="@/assets/img/modules/visual/noData.png"
alt="" alt=""
srcset="" srcset=""
class="no-data-img" /> class="no-data-img" />
@ -72,7 +72,7 @@
</template> </template>
<script> <script>
import ScreenLoading from "../screen-loading/index"; import ScreenLoading from "../../components/screen-loading/index";
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import Vue from "vue"; import Vue from "vue";
@ -117,15 +117,39 @@ export default {
}, },
mounted () { mounted () {
this.loadTypeList()
}, },
created () { }, created () { },
methods: { methods: {
hiddenTypeList () {
this.showTypeSelect = false
},
async loadTypeList () {
//
const url = "/sys/dict/data/dictlist"
let params = {
dictType: 'ic_user_change_type'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.typeList = data
} else {
this.$message.error(msg)
}
},
// //
async getUserwarnlist (monthId, categoryKey, pageNo, pageSize) { async getRecordlist (monthId, categoryKey, pageNo, pageSize) {
this.visibleLoading = true this.visibleLoading = true
if (monthId) { if (monthId) {
this.monthId = monthId this.monthId = monthId
@ -170,7 +194,7 @@ export default {
handleClickType (value, label) { handleClickType (value, label) {
this.typeShow = label this.typeShow = label
this.selType = value this.selType = value
this.getUserwarnlist() this.getRecordlist()
this.showTypeSelect = !this.showTypeSelect this.showTypeSelect = !this.showTypeSelect
}, },
@ -204,11 +228,15 @@ export default {
} }
&-select { &-select {
position: relative; position: relative;
cursor: pointer;
// display: flex; // display: flex;
// justify-content: space-around; // justify-content: space-around;
> span {
cursor: pointer;
}
> img { > img {
cursor: pointer;
margin-left: 10px; margin-left: 10px;
// width: 10px; // width: 10px;
// height: 10px; // height: 10px;
@ -286,7 +314,7 @@ export default {
} }
&-tr:hover { &-tr:hover {
background: url("../../../../../../../assets/img/modules/visual/hover-bac.png") background: url("../../../../../assets/img/modules/visual/hover-bac.png")
no-repeat center; no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -323,6 +351,7 @@ export default {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
cursor: pointer;
.user_item_content { .user_item_content {
display: flex; display: flex;
Loading…
Cancel
Save