Commit ee168fb5 by 米嘉伟

人员批量关注,有过滤数据再提示

parent 30568c87
......@@ -81,7 +81,10 @@
<div class="split-line">
<div class="options">
<div class="left">
<div class="btn" @click="batch">
<div
class="btn"
@click="batch"
>
{{ $t('Common.batch_operation') }}
</div>
<el-checkbox-group
......@@ -128,7 +131,11 @@
>
{{ $t('Common.follow') }}
</div>
<div class="btn" v-if="roleArr.includes('F-1-5')" @click="delMore">
<div
class="btn"
v-if="roleArr.includes('F-1-5')"
@click="delMore"
>
{{ $t('Common.delete_btn') }}
</div>
<div
......@@ -149,7 +156,10 @@
</div>
</div>
<!--四 -->
<el-tag style="width: 100%" v-show="isShowTip">
<el-tag
style="width: 100%"
v-show="isShowTip"
>
<span v-html="'&nbsp;&nbsp;'"></span>
<i
class="iconfont icon-tanhao1"
......@@ -165,7 +175,7 @@
:underline="false"
style="margin-left: 1.25rem"
@click="toggleSelection()"
>{{ $t('Common.clear_up') }}
>{{ $t('Common.clear_up') }}
</el-link>
</el-tag>
......@@ -260,9 +270,15 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column :label="$t('Common.option')" width="auto">
<el-table-column
:label="$t('Common.option')"
width="auto"
>
<template slot-scope="scope">
<div class="ops" @click.stop="closeSelected">
<div
class="ops"
@click.stop="closeSelected"
>
<el-tooltip
class="item"
v-if="roleArr.includes('F-1-8')"
......@@ -273,7 +289,10 @@
>
<!-- <i></i> -->
<!-- <span class="iconfont icon-bianji1 zttb"></span> -->
<div class="icon-div" @click="handleClick(scope.row)">
<div
class="icon-div"
@click="handleClick(scope.row)"
>
<!-- <img-->
<!-- src="../../assets/img/qbryk/bj.svg"-->
<!-- alt=""-->
......@@ -289,7 +308,10 @@
:open-delay="500"
v-if="roleArr.includes('F-1-9')"
>
<div v-if="scope.row.collectstatus == 1" class="icon-div">
<div
v-if="scope.row.collectstatus == 1"
class="icon-div"
>
<el-popconfirm
placement="top-start"
:hide-icon="true"
......@@ -306,7 +328,10 @@
</div>
</el-popconfirm>
</div>
<div v-else class="icon-div">
<div
v-else
class="icon-div"
>
<!-- class="icon sc"-->
<div @click="isShowGzBtn1(scope.row)">
<!-- <img-->
......@@ -325,7 +350,10 @@
:open-delay="500"
v-if="roleArr.includes('F-1-10')"
>
<div class="icon-div" @click="isShowGgrytmBtn(scope.row)">
<div
class="icon-div"
@click="isShowGgrytmBtn(scope.row)"
>
<!-- <img-->
<!-- src="../../assets/img/qbryk/gx.svg"-->
<!-- alt=""-->
......@@ -341,7 +369,10 @@
:open-delay="500"
v-if="roleArr.includes('F-1-11')"
>
<div class="icon-div" @click="isShowFcxBtn1(scope.row)">
<div
class="icon-div"
@click="isShowFcxBtn1(scope.row)"
>
<!-- <img-->
<!-- src="../../assets/img/qbryk/search.svg"-->
<!-- alt=""-->
......@@ -357,7 +388,10 @@
v-if="roleArr.includes('F-1-12')"
:open-delay="500"
>
<div class="icon-div" @click="isShowFztmBtn(scope.row)">
<div
class="icon-div"
@click="isShowFztmBtn(scope.row)"
>
<!-- <img-->
<!-- src="../../assets/img/qbryk/bz.svg"-->
<!-- alt=""-->
......@@ -398,16 +432,14 @@
v-if="scope.row.collectstatus !== 1"
@click="clickCancle(scope.$index, scope.row)"
class="iconfont"
>&#xe609;</span
>
>&#xe609;</span>
</div>
</el-popconfirm>
<span
v-if="scope.row.collectstatus === 1"
@click="clickCancle(scope.$index, scope.row)"
class="iconfont"
>&#xe609;</span
>
>&#xe609;</span>
</div>
</el-tooltip>
</div>
......@@ -417,11 +449,9 @@
</div>
<!-- 六 -->
<div class="block">
<span class="record"
>{{ $t('Common.all') }}{{ reqParam.page.total }}{{ $t('Common.item')
<span class="record">{{ $t('Common.all') }}{{ reqParam.page.total }}{{ $t('Common.item')
}}{{ $t('Common.record') }} {{ $t('Common.di')
}}{{ reqParam.page.currPage }}/{{ size }}{{ $t('Common.page') }}</span
>
}}{{ reqParam.page.currPage }}/{{ size }}{{ $t('Common.page') }}</span>
<el-pagination
class="paging"
@size-change="handleSizeChange"
......@@ -479,7 +509,10 @@
>
</fcx>
<!-- 新增人员弹窗 -->
<xzry :isShowXzry="isShowXzry" @closeXzry="closeXzry"></xzry>
<xzry
:isShowXzry="isShowXzry"
@closeXzry="closeXzry"
></xzry>
<!-- 人员信息卡 -->
<ryxxk
:isShowRyxxk="isShowRyxxk"
......@@ -523,7 +556,7 @@ export default {
xzry,
ryxxk,
},
created() {
created () {
let w1 = 1920
let w2 = window.innerWidth
this.width1 = (this.width1 * w2) / w1
......@@ -532,7 +565,7 @@ export default {
this.width4 = (this.width4 * w2) / w1
this.width5 = (this.width5 * w2) / w1
},
data() {
data () {
return {
width33: '50',
selectBoo: false, // 是否批量操作
......@@ -597,22 +630,22 @@ export default {
}
},
methods: {
disabledDate(a) {
disabledDate (a) {
if (a.getTime() > new Date().getTime()) {
return true
} else {
return false
}
},
getPopConfirmRef(index) {
getPopConfirmRef (index) {
return this.popConfirmName + index
},
canclePopConfirm() {
canclePopConfirm () {
if (this.popConfirmIndex !== -1) {
this.$refs[this.getPopConfirmRef(this.popConfirmIndex)].cancel()
}
},
clickCancle(index, item) {
clickCancle (index, item) {
let _that = this
this.canclePopConfirm() // 删除上次打开的页面
this.popConfirmIndex = index
......@@ -625,25 +658,25 @@ export default {
}
},
// 单击行抽屉
handle(row, event, column) {
handle (row, event, column) {
//console.log(row, event, column)
// this.drawer = true
// this.$bus.emit('isBlur', true)
},
handleClose(done) {
handleClose (done) {
this.$confirm(this.$t('Common.confirm_close'))
.then((_) => {
done()
})
.catch((_) => {})
.catch((_) => { })
},
cellClass(row) {
cellClass (row) {
if (row.columnIndex === 0) {
return 'disableheadselection'
}
},
// 点击单条关闭批量操作
closeSelected() {
closeSelected () {
this.disabled = false
this.selectBoo = false
this.isShowTip = false
......@@ -652,12 +685,12 @@ export default {
/**
* @description: 选择时间
* @return {*}
*/
selectTime() {
*/
selectTime () {
this.search()
},
// 获取全部人员列表请求
search(page = 1) {
search (page = 1) {
let self = this
this.selectBoo = false
// //console.info("请求===>", this.reqParam);
......@@ -701,19 +734,19 @@ export default {
})
},
// 保存选中的数据,row-key就是要指定一个key标识这一行的数据
getRowKeys(row) {
getRowKeys (row) {
return row.id
},
// 清空输入框
empty() {
empty () {
this.reqParam.personStoreCustomSearch.ysxtAsjxgrybh = ''
this.search()
},
// 新增案件操作
isShowXzryBtn() {
isShowXzryBtn () {
this.isShowXzry = true
},
closeXzry(val) {
closeXzry (val) {
//console.log("新增人员关闭", val);
// 增加毛玻璃
this.$bus.emit('isBlur', val)
......@@ -724,13 +757,13 @@ export default {
// this.search();
},
// 人员信息卡操作
isShowRyxxkBtn(row) {
isShowRyxxkBtn (row) {
// console.log("row", row)
this.rowData = row
console.log('row', row)
this.isShowRyxxk = true
},
closeRyxxk(val) {
closeRyxxk (val) {
//console.log("新增人员关闭", val);
// 增加毛玻璃
this.$bus.emit('isBlur', val)
......@@ -738,12 +771,12 @@ export default {
// this.search();
},
// 时间格式化
dateTimeFormat(row, colnum) {
dateTimeFormat (row, colnum) {
let prop = colnum.property
return row[prop] ? moment(row[prop]).format('YYYY-MM-DD') : '---'
},
// 性别格式化
xbdmFormat(row, colnum) {
xbdmFormat (row, colnum) {
let xbdm = row.xbdm
let showProp = null
if (xbdm == 0) {
......@@ -760,7 +793,7 @@ export default {
return showProp
},
// 是否采集二代证格式化
ifidcardFormat(row, colnum) {
ifidcardFormat (row, colnum) {
let ifidcard = row.ifidcard
let showProp = null
if (ifidcard == 1) {
......@@ -773,13 +806,13 @@ export default {
return showProp
},
// 搜索方式
searchStyle(val) {
searchStyle (val) {
// //console.log(val, '搜索方式')
this.reqParam.page.searchOptions = val
// //console.log(this.reqParam.page.searchOptions)
},
//滚动平面等筛选条件
searchCheckList(val) {
searchCheckList (val) {
//console.log(val, "筛选条件");
this.reqParam.page.checkboxQuery = val
this.reqParam.page.currPage = 1 // 当前页码
......@@ -787,7 +820,7 @@ export default {
this.search()
},
// 复制条码号 获取选中条码值
getysxtAsjxgrybh() {
getysxtAsjxgrybh () {
let self = this
this.ysxtAsjxgrybh = []
if (this.multipleSelection.length === 0) {
......@@ -808,7 +841,7 @@ export default {
// }
},
// 复制成功时的回调函数
onCopy(e) {
onCopy (e) {
if (this.multipleSelection.length != 0) {
this.$message({
type: 'success',
......@@ -818,13 +851,13 @@ export default {
}
},
// 复制失败时的回调函数
onError(e) {
onError (e) {
if (this.multipleSelection.length != 0) {
this.$message.error(this.$t('Common.sorry_copy_barcode_fail'))
}
},
// 添加到队列
isShowTjddlBtn() {
isShowTjddlBtn () {
//console.log("添加到队列");
if (this.multipleSelection.length === 0) {
this.$message.error(this.$t('Common.select_need_add_queue_data'))
......@@ -835,13 +868,13 @@ export default {
this.isShowTjddl = true
}
},
closeTjddl(val) {
closeTjddl (val) {
this.$bus.emit('isBlur', val)
//console.log("添加到队列关闭", val);
this.isShowTjddl = val
},
// 导出FPTX
isShowDcftpxBtn() {
isShowDcftpxBtn () {
// 多行
//console.log("导出FPTX");
......@@ -864,13 +897,13 @@ export default {
// this.isShowDcftpx = true;
// }
},
closeDcftpx(val) {
closeDcftpx (val) {
this.$bus.emit('isBlur', val)
//console.log("导出FPTX关闭", val);
this.isShowDcftpx = val
},
// 关注
isShowGzBtn() {
isShowGzBtn () {
// 多行
//console.log("关注");
let newarr = []
......@@ -880,9 +913,13 @@ export default {
this.isShowTip = true
} else {
let arr = this.multipleSelection
var index = 1
for (var i = 0; i < arr.length; i++) {
if (arr[i].collectstatus == 1) {
if (index == 1) {
this.$message.info(this.$t('Common.filter_follow_data'))
index++
}
// this.$message.error("该数据已关注")
} else {
newarr.push(arr[i])
......@@ -891,13 +928,12 @@ export default {
if (newarr.length == 0) {
this.$message.error(this.$t('Common.not_repeat_follow'))
} else {
this.$message.info(this.$t('Common.filter_follow_data'))
this.rowData = newarr
this.isShowGz = true
}
}
},
isShowGzBtn1(val) {
isShowGzBtn1 (val) {
// 单行
//console.log(val, 123);
let rowVal = []
......@@ -905,7 +941,7 @@ export default {
this.rowData = rowVal
this.isShowGz = true
},
closeGz(val) {
closeGz (val) {
this.$bus.emit('isBlur', val)
//console.log("关注关闭", val);
this.isShowGz = val
......@@ -914,7 +950,7 @@ export default {
}
},
// 取消关注
qxgz(val) {
qxgz (val) {
// alert(val)
this.$axios
.delete('/api/mypsn/cancel', { params: { pids: val } })
......@@ -928,12 +964,12 @@ export default {
})
},
// 更改条码操作
isShowGgrytmBtn(val) {
isShowGgrytmBtn (val) {
//console.log("更改条码", val);
this.rowData = val
this.isShowGgrytm = true
},
closeGgrytm(val) {
closeGgrytm (val) {
this.$bus.emit('isBlur', val)
//console.log("更改条码关闭", val);
this.isShowGgrytm = val
......@@ -943,12 +979,12 @@ export default {
},
//复制条码列表操作
isShowFztmBtn(val) {
isShowFztmBtn (val) {
//console.log("复制条码", val);
this.rowData = val
this.isShowFztm = true
},
closeFztm(val) {
closeFztm (val) {
this.$bus.emit('isBlur', val)
//console.log("closeFztm复制条码关闭", val);
this.isShowFztm = val
......@@ -958,7 +994,7 @@ export default {
},
//发查询操作(多行)
isShowFcxBtn() {
isShowFcxBtn () {
if (this.multipleSelection.length === 0) {
this.$message.error(this.$t('Common.select_need_fcx_data'))
this.selectBoo = true
......@@ -968,21 +1004,21 @@ export default {
this.isShowFcx = true
}
},
isShowFcxBtn1(val) {
isShowFcxBtn1 (val) {
//console.log("单行人员发查询数据", val);
let rowVal = []
rowVal.push(val)
this.rowData = rowVal
this.isShowFcx = true
},
closeFcx(val) {
closeFcx (val) {
this.$bus.emit('isBlur', val)
//console.log("发查询关闭", val);
this.isShowFcx = val
// this.search()
},
// 多选删除
delMore() {
delMore () {
// 检查table选择的数据 如果没有选择则不可以删除
if (this.multipleSelection.length === 0) {
this.$message.error(this.$t('Common.select_delete_data'))
......@@ -1013,11 +1049,11 @@ export default {
this.doDelete(psns)
this.multipleSelection = []
})
.catch((_) => {})
.catch((_) => { })
}
},
// 单选删除
delOne(val) {
delOne (val) {
//console.log("删除数据");
// 将传入的psns转为数组
let psns = []
......@@ -1030,7 +1066,7 @@ export default {
this.doDelete(psns)
},
// 请求删除接口
doDelete(psns) {
doDelete (psns) {
this.$axios
.post('/api/personstore/delete', { psns: psns })
.then((response) => {
......@@ -1049,7 +1085,7 @@ export default {
* @param {*}
* @return {*}
*/
batch() {
batch () {
this.disabled = !this.disabled
this.selectBoo = !this.selectBoo
this.isShowTip = !this.isShowTip
......@@ -1058,7 +1094,7 @@ export default {
}
// this.$set(this.multipleSelection, [])
},
cancel() {
cancel () {
alert(888)
},
/**
......@@ -1066,7 +1102,7 @@ export default {
* @param {*} row
* @return {*}
*/
handleClick(row) {
handleClick (row) {
this.closeSelected()
// console.log(row);
// 清除bus
......@@ -1088,7 +1124,7 @@ export default {
* @param {*} val
* @return {*}
*/
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val
//console.log(this.multipleSelection);
// if (this.multipleSelection.length) {
......@@ -1102,7 +1138,7 @@ export default {
* @param {*} pageSize 每页条数
* @return {*}
*/
handleSizeChange(pageSize) {
handleSizeChange (pageSize) {
this.reqParam.page.pageSize = pageSize
//console.log("每页条数", this.reqParam.page.pageSize);
},
......@@ -1111,7 +1147,7 @@ export default {
* @param {*} page 当前页
* @return {*}
*/
handleCurrentChange(page) {
handleCurrentChange (page) {
// this.reqParam.page.currPage = page;
//console.log("当前页", this.reqParam.page.currPage);
this.search(page)
......@@ -1121,7 +1157,7 @@ export default {
* @param {*}
* @return {*}
*/
toggleSelection(rows) {
toggleSelection (rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.multipleTable.toggleRowSelection(row)
......@@ -1131,7 +1167,7 @@ export default {
}
// //console.log(this.multipleSelection);
},
onDblclickListener() {
onDblclickListener () {
this.reqParam = {
// 请求参数
page: {
......@@ -1152,7 +1188,7 @@ export default {
},
}
},
onClickEnterKeyup(code) {
onClickEnterKeyup (code) {
var _that = this
//事件中keycode=13为回车事件
if (code === 13) {
......@@ -1161,11 +1197,11 @@ export default {
},
},
computed: {
roleArr() {
roleArr () {
return this.$store.state.layout.Menu
},
},
mounted() {
mounted () {
this.search()
if (this.$route.query.xzry === 'true') {
this.isShowXzry = true
......@@ -1173,11 +1209,11 @@ export default {
this.$keyBoard(this, 'onClickEnterKeyup')
// this.$dblclick(this, 'onDblclickListener')
},
activated() {
activated () {
this.$keyBoard(this, 'onClickEnterKeyup')
},
watch: {
selectBoo(val) {
selectBoo (val) {
let _that = this
_that.isShowTip = val
_that.multipleSelection = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment