parent
9f9140ec0e
commit
52081420d6
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class="table-person-info-cell-style" @click="setDuty">
|
||||
<person-info-view v-if="showInfo" :info="info" />
|
||||
<div v-else class="setting-btn-style" @click="setDuty">设置值班人员</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Upload from '../../../../../../components/common/uploader/Upload.vue';
|
||||
import PersonInfoView from './personInfoView.vue';
|
||||
export default{
|
||||
props: {
|
||||
info: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
showInfo: this.$props.info && Object.keys(this.$props.info).length > 0 ? true : false,
|
||||
fileJson: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
info: function (val) {
|
||||
this.info = val;
|
||||
this.showInfo = val && Object.keys(val).length > 0 ? true : false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setDuty: function () {
|
||||
this.$emit('setDuty')
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Upload,
|
||||
PersonInfoView
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.table-person-info-cell-style {
|
||||
.setting-btn-style {
|
||||
color: #31a8fa;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="duty-person-info-view-style">
|
||||
<Upload :type="2" :multiple="false" :option="{}" :fileData="fileJson" ref="fileUpload" :canUpload="false"
|
||||
:canDownload="false"/>
|
||||
<div>{{info.staff_name}}</div>
|
||||
<div>{{'<' + info.position + '>'}}</div>
|
||||
<div>{{info.telephone}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Upload from '../../../../../../components/common/uploader/Upload.vue';
|
||||
export default{
|
||||
props: {
|
||||
info: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
fileJson: [],
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
info:function (val) {
|
||||
this.info = val;
|
||||
this.buildFile(val.id_photo_json);
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.buildFile(this.$props.info.id_photo_json);
|
||||
},
|
||||
methods: {
|
||||
buildFile: function (fileObj) {
|
||||
if (fileObj && Object.keys(fileObj).length > 0) {
|
||||
this.fileJson = [];
|
||||
fileObj["key"] = fileObj['url'];
|
||||
this.fileJson.push(fileObj);
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Upload
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.duty-person-info-view-style{
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.upload-container-style {
|
||||
width: auto !important;
|
||||
.img-style {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div class="person-list-choose-style">
|
||||
<vue-scroll :ops="listScroll" style="height:19rem" class="score-list-div">
|
||||
<div class="content-style">
|
||||
<div class="info-box-style" v-for="item in dataList" :key="item.staff_id">
|
||||
<person-info-view :info="item"/>
|
||||
<a-button class="choose-btn-style" type="primary" @click="choose(item)">选择</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/*
|
||||
* 人员选择组件
|
||||
* */
|
||||
import InterConfig from '../interConfig';
|
||||
import PersonInfoView from './personInfoView.vue';
|
||||
import {Button} from 'ant-design-vue';
|
||||
export default{
|
||||
data(){
|
||||
return {
|
||||
staffName: "",
|
||||
dataList: [],
|
||||
listScroll: this.StaticParams.scrollOption,
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getPersonList();
|
||||
},
|
||||
methods: {
|
||||
getPersonList: function () {
|
||||
let param = {
|
||||
bureau_id: this.BaseConfig.person_info_my.bureau_id,
|
||||
staff_name: "",
|
||||
}
|
||||
this.InterfaceConfig.callInterface([{
|
||||
url: InterConfig.chooseStaffs.url,
|
||||
params: param,
|
||||
method: InterConfig.chooseStaffs.method,
|
||||
isTestLogin: InterConfig.chooseStaffs.isTestLogin,
|
||||
}], (result) => {
|
||||
this.loading = false;
|
||||
let resData = result[0].data;
|
||||
if (resData.code === 2000) {
|
||||
let dataList = resData.data;
|
||||
if (dataList && dataList.length > 0) {
|
||||
for (let i = 0, len = dataList.length; i < len; i++) {
|
||||
dataList[i]['index'] = i + 1 + ((this.pageNumber - 1) * 10);
|
||||
let fileList = [];
|
||||
dataList[i]['id_photo_json']['key'] = dataList[i]['id_photo_json']['url'];
|
||||
fileList.push(dataList[i]['id_photo_json']);
|
||||
dataList[i]['fileList'] = fileList;
|
||||
}
|
||||
}
|
||||
this.dataList = dataList;
|
||||
}
|
||||
})
|
||||
},
|
||||
choose: function (info) {
|
||||
this.$emit("submitChoose", info.staff_id)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PersonInfoView,
|
||||
AButton: Button
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.person-list-choose-style {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
.content-style {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
.info-box-style {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 0.5rem;
|
||||
/deep/ .img-style {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.choose-btn-style {
|
||||
margin: 0.5rem 0;
|
||||
width: 50%;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue