Browse Source

借阅/收集管理库筛选修复

master
xuhuajiao 12 months ago
parent
commit
8976bd2b54
  1. 22
      src/api/archiveUtilize/cart.js
  2. 2
      src/layout/components/Navbar.vue
  3. 6
      src/router/routers.js
  4. 61
      src/views/archiveUtilize/archiveSearch/module/resultList.vue
  5. 334
      src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue
  6. 65
      src/views/archivesManage/managementLibrary/index.vue
  7. 80
      src/views/collectReorganizi/collectionLibrary/index.vue
  8. 149
      src/views/system/user/cart.vue

22
src/api/archiveUtilize/cart.js

@ -0,0 +1,22 @@
import request from '@/utils/request'
// import qs from 'qs'
// 添加档案至借阅车
export function FetchAddBorrowCar(data) {
return request({
url: 'api/archivesUtilize/addBorrowCar',
method: 'post',
data: data
})
}
// 添加借阅流程
export function FetchInitAddBorrowFlow(data) {
return request({
url: 'api/archivesUtilize/addBorrowFlow',
ethod: 'post',
data: data
})
}
export default { FetchAddBorrowCar, FetchInitAddBorrowFlow }

2
src/layout/components/Navbar.vue

@ -20,7 +20,9 @@
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<router-link :to="{ path: '/user/cart'}">
<div class="iconfont icon-jieyueche-ding" />
</router-link>
<!-- 消息中心 -->
<el-dropdown ref="messageDrop" class="message-center right-menu-item hover-effect" trigger="click">
<div class="message-icon">

6
src/router/routers.js

@ -55,6 +55,12 @@ export const constantRouterMap = [
component: (resolve) => require(['@/views/system/user/center'], resolve),
name: '个人中心',
meta: { title: '个人中心' }
},
{
path: 'cart',
component: (resolve) => require(['@/views/system/user/cart'], resolve),
name: '借阅车',
meta: { title: '借阅车' }
}
]
},

61
src/views/archiveUtilize/archiveSearch/module/resultList.vue

@ -123,13 +123,13 @@
<span v-if="item.isEntity === 1">实体</span>
<span v-if="item.tid !== null">标签</span>
<span v-if="item.caseNo !== null">装盒</span>
<span v-if="item.folderLocation !== ''">入库</span>
<span v-if="item.folderLocation !== '' && item.folderLocation !== null">入库</span>
<span v-if="item.isBorrow">借阅</span>
</div>
<div class="item-bottom-handle">
<span @click.stop="handleDetail(item)">查看详情</span>
<i class="iconfont icon-liuchengfaqi" @click.stop="initiateLending" />
<i class="iconfont icon-jiarujieyueche" @click.stop="addLending" />
<i class="iconfont icon-liuchengfaqi" @click.stop="initiateLending(item)" />
<i class="iconfont icon-jiarujieyueche" @click.stop="addLending(item)" />
</div>
</div>
</div>
@ -149,16 +149,19 @@
</div>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<LendForm ref="lendFormRef" />
</div>
</template>
<script >
import { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch, FetchSeniorSearch } from '@/api/archiveUtilize/archiveUtilize'
import ArchivesInfo from '@/views/components/archivesDetail/detail.vue'
import { FetchAddBorrowCar } from '@/api/archiveUtilize/cart'
import ArchivesInfo from '@/views/components/archivesDetail/detail'
import LendForm from '../../utillizeRecord/module/utilizationProcess'
import { mapGetters } from 'vuex'
export default {
name: 'ResultList',
components: { ArchivesInfo },
components: { ArchivesInfo, LendForm },
props: {
isCommon: {
type: Boolean,
@ -373,32 +376,6 @@ export default {
this.fondsOptions = res
})
},
// filterData(data) {
// const result = []
// for (const node of data) {
// if (node.isType === 2) {
// const filteredChildren = node.children.filter(child => child.isType !== 3)
// node.children = filteredChildren
// result.push(node)
// } else if (node.children && node.children.length > 0) {
// const filteredChildren = this.filterData(node.children)
// result.push(...filteredChildren)
// }
// }
// return result
// },
// filterArchivesClasses(data, result = []) {
// if (data && data.length > 0) {
// for (let i = 0; i < data.length; i++) {
// const archivesClasses = data[i].archivesClasses
// if (archivesClasses && archivesClasses.length > 0) {
// result.push(...archivesClasses)
// }
// this.filterArchivesClasses(data[i].children, result)
// }
// }
// return result
// },
getCategoryDataTree() {
FetchInitSearchCategory().then(res => {
this.categoryOptions = res
@ -529,26 +506,38 @@ export default {
this.$refs.archivesInfo.archivesTabIndex = 0
})
},
initiateLending() {
initiateLending(item) {
this.$confirm('当前档案即将发起借阅' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.$message({ message: '确定发起借阅', type: 'success', offset: 8 })
// this.$message({ message: '', type: 'success', offset: 8 })
this.$nextTick(() => {
this.$refs.lendFormRef.detailArcData = []
this.$refs.lendFormRef.lendFormVisible = true
item.checkedId = []
this.$refs.lendFormRef.detailArcData.push(item)
})
}).catch(() => {
})
},
addLending() {
console.log('加入借阅')
addLending(data) {
this.$confirm('当前档案是否加入借阅车' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.$message({ message: '确定加入借阅车', type: 'success', offset: 8 })
const params = {
'archivesId': data.archivesId
}
console.log(params)
FetchAddBorrowCar(params).then(res => {
console.log(res)
})
// this.$message({ message: '', type: 'success', offset: 8 })
}).catch(() => {
})
},

334
src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue

@ -0,0 +1,334 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="lendFormVisible" :before-close="handleCloseDialog" @opened="opened">
<div class="setting-dialog">
<el-form ref="form" :model="form" :rules="rules" inline label-width="100px">
<el-form-item label="利用人" prop="applicant">
<el-input v-model="form.applicant" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="利用流程" prop="title">
<el-input v-model="form.title" style="width: 280px;" />
</el-form-item>
<el-form-item label="开始时间" prop="giveStartTime">
<el-date-picker
v-model="form.giveStartTime"
:picker-options="pickerStartTime"
type="date"
align="right"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 280px;"
disabled
/>
</el-form-item>
<el-form-item label="结束时间" prop="giveEndTime">
<el-date-picker
v-model="form.giveEndTime"
:picker-options="pickerEndTime"
type="date"
align="right"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 280px;"
/>
</el-form-item>
<el-row>
<el-form-item label="利用事由" prop="reason">
<el-input v-model="form.reason" type="textarea" :rows="4" style="width: 703px;" />
</el-form-item>
</el-row>
<!-- <el-row>
<el-form-item label="状态" prop="status">
<span class="row-state soon-state">即将到期</span>
<span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span>
</el-form-item>
</el-row> -->
</el-form>
<el-table
ref="table"
:data="detailArcData"
style="width: 100%;"
height="calc(100vh - 560px)"
>
<el-table-column type="index" label="序号" align="center" width="55" />
<el-table-column prop="maintitle" label="档案文件" show-overflow-tooltip>
<template slot-scope="scope">
<div class="title-style"><span>文件</span>{{ scope.row.archiveNo }}{{ scope.row.maintitle }}</div>
</template>
</el-table-column>
<el-table-column prop="checkedId" label="利用方式" width="340">
<template slot-scope="scope">
<el-checkbox-group v-model="scope.row.checkedId" class="checkbox-style" @change="handleChecked">
<el-checkbox v-for="item in List" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<!-- <el-table-column prop="createTime" label="实体借阅状态" align="center" width="110">
<template>
<div>
<span class="row-state soon-state">即将到期</span>
<span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span>
</div>
</template>
</el-table-column> -->
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click.native="handleCloseDialog">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</el-dialog>
</template>
<script>
import { FetchFondsDetail } from '@/api/system/fonds'
import { FetchIntoFlowBusiness } from '@/api/archivesManage/library'
import { FetchBusinessFlowTitle } from '@/api/collect/collect'
import { mapGetters } from 'vuex'
import { getCurrentTime } from '@/utils/index'
export default {
name: 'LendForm',
components: { },
data() {
return {
title: '利用详情',
lendFormVisible: false,
form: {
applicant: null,
title: null,
giveStartTime: null,
giveEndTime: null,
reason: null,
fondsNo: null
},
detailArcData: [],
List: [
{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}
],
rules: {
title: [
{ required: true, message: '标题不可为空', trigger: 'blur' }
],
giveStartTime: [
{ required: true, message: '开始时间不可为空', trigger: 'blur' }
],
giveEndTime: [
{ required: true, message: '结束时间不可为空', trigger: 'blur' }
],
reason: [
{ required: true, message: '利用事由不可为空', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'user',
'baseApi'
]),
pickerStartTime() {
const _this = this
return {
disabledDate: time => {
if (_this.form.giveEndTime) {
const giveEndTime = _this.form.giveEndTime.replace(/-/g, '/')
return time.getTime() > new Date(giveEndTime)
}
}
}
},
pickerEndTime() {
const _this = this
return {
disabledDate: time => {
if (_this.form.giveStartTime) {
const giveStartTime = _this.form.giveStartTime.replace(/-/g, '/')
return time.getTime() < new Date(giveStartTime)
}
}
}
}
},
mounted() {
},
methods: {
opened() {
this.form.applicant = this.user.username
this.form.giveStartTime = getCurrentTime()
this.getFondsDetail()
// this.$refs.archivesListModule.getViewTable()
},
handleChecked(item) {
console.log('item', item)
},
getFondsDetail() {
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => {
this.form.fondsNo = res.fondsNo
if (res.fondsNo) {
this.getBusinessFlowTitle()
}
}).catch(err => {
console.log(err)
})
},
getBusinessFlowTitle() {
const params = {
'username': this.user.username,
'fondsNo': this.form.fondsNo,
'businessType': 5
}
FetchBusinessFlowTitle(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.form.title = res
} else {
this.$message({ message: '失败', type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
})
},
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'title': this.form.title, //
'applicant': this.user.username, //
'archivesIds': archivesIds,
'businessType': 5,
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'reason': this.form.reason,
'fondsNo': this.form.fondsNo, //
'targetFondsNo': this.targetFondsNo ? this.targetFondsNo.fondsId : null//
// 'targetPosition': 'string', //
// 'startPosition': 'string', //
// 'givegiveStartTime': null, //
// 'giveEndTime': null //
}
console.log(params)
FetchIntoFlowBusiness(params).then((res) => {
if (res.code !== 5001) {
this.$message({ message: '操作提交成功', type: 'success', offset: 8 })
this.$emit('close-dialog')
} else {
// const message = JSON.parse(res.message)
// this.$message.error(message.fail.join(',') + '')
this.$message({ message: res.message, type: 'error', offset: 8 })
}
this.handleClose()
}).catch(err => {
console.log(err)
})
} else {
console.log('error submit!!')
return false
}
})
},
tableDoubleClick(row) {
this.lendDetail = true
},
handleCloseDialog(done) {
this.lendFormVisible = false
//
// done()
}
}
}
</script>
<style lang="scss" scoped>
.recordList-main{
height: calc(100vh - 236px);
.start-date,
.end-date{
display: flex;
justify-content: flex-start;
padding-left: 8px;
font-size: 14px;
line-height: 30px;
color: #0C0E1E;
span{
display: block;
margin-right: 8px;
}
}
.iconfont{
font-size: 14px;
}
.icon-fou{
color: #A6ADB6;
}
.icon-shi{
color: #12C37A;
}
.icon-dengdai{
color: #FF8329;
}
.icon-cuowu1{
color: #ED4A41;
}
.row-state{
width: 56px;
padding: 0;
text-align: center;
}
}
.title-style{
span{
display: inline-block;
width: 42px;
height: 22px;
line-height: 22px;
text-align: center;
font-size: 12px;
color: #0348F3;
background-color: #CAE1FF;
border-radius: 3px;
}
}
::v-deep .el-dialog{
width: 860px !important;
.el-form-item .el-form-item__content{
width: 280px;
}
.dialog-footer{
margin-top: 15px !important;
}
}
::v-deep .el-checkbox-group{
.el-checkbox{
margin-right: 10px !important;
}
}
::v-deep .el-pagination{
margin: 24px 0 10px 0 !important
}
::v-deep .input-prepend .el-input__inner{
padding-left: 100px;
}
</style>

65
src/views/archivesManage/managementLibrary/index.vue

@ -168,7 +168,7 @@ export default {
this.yearChildData = data
this.classifyLoading = true
setTimeout(() => {
if (this.classifyTree[0].dictionaryName === '年度') {
if (this.classifyTree.length !== 0 && this.classifyTree[0].dictionaryName === '年度') {
this.classifyTree = this.classifyTree.slice(1)
}
if (this.yearChildData.length !== 0) {
@ -279,31 +279,37 @@ export default {
}
this.$nextTick(() => {
this.getDictsList()
Promise.all(this.user.roles.map(item => this.getRole(item.id)))
.then(roles => {
const allFondsIds = []
const fondsObj = {}
roles.forEach(role => {
role.fonds.forEach(fond => {
if (!fondsObj[fond.id]) {
fondsObj[fond.id] = fond
allFondsIds.push(fond.id)
}
})
})
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
if (allFondsIds.length !== 0) {
const defaultChecked = this.$refs.classifyTree.getCheckedNodes()
const fondsGroup = defaultChecked.filter(item => item.fondsId).map(item => item.fondsNo)
this.smartQuery.fonds_no = fondsGroup.join(',')
} else {
this.smartQuery.fonds_no = null
}
this.handlePageList()
})
.catch(error => {
console.error(error)
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
})
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
// .then(roles => {
// const allFondsIds = []
// const fondsObj = {}
// roles.forEach(role => {
// role.fonds.forEach(fond => {
// if (!fondsObj[fond.id]) {
// fondsObj[fond.id] = fond
// allFondsIds.push(fond.id)
// }
// })
// })
// this.$refs.classifyTree.setCheckedKeys(allFondsIds)
// if (allFondsIds.length !== 0) {
// const defaultChecked = this.$refs.classifyTree.getCheckedNodes()
// const fondsGroup = defaultChecked.filter(item => item.fondsId).map(item => item.fondsNo)
// this.smartQuery.fonds_no = fondsGroup.join(',')
// } else {
// this.smartQuery.fonds_no = null
// }
// this.handlePageList()
// })
// .catch(error => {
// console.error(error)
// })
})
},
handlePageList(isQuickFilter) {
@ -375,7 +381,14 @@ export default {
})
fonds = parent
}
if (res.dictionarys.length === 0) {
this.classifyTree = []
if (fonds.length !== 0) {
this.classifyTree.push(fonds)
}
} else {
this.classifyTree = res.dictionarys.concat(fonds)
}
this.classifyLoading = false
}).catch(err => {
console.log(err)
@ -392,7 +405,6 @@ export default {
handleCheckChange(data, checked, indeterminate) {
//
const res = this.$refs.classifyTree.getCheckedNodes()
console.log('res', res)
// const isFondsTop = res.some(obj => obj.fondsName === '')
// if (isFondsTop) {
// this.smartQuery.fonds_no = null
@ -400,6 +412,9 @@ export default {
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})
})
} else {
this.smartQuery.fonds_no = fondsGroup.join(',')

80
src/views/collectReorganizi/collectionLibrary/index.vue

@ -170,7 +170,7 @@ export default {
this.yearChildData = data
this.classifyLoading = true
setTimeout(() => {
if (this.classifyTree[0].dictionaryName === '年度') {
if (this.classifyTree.length !== 0 && this.classifyTree[0].dictionaryName === '年度') {
this.classifyTree = this.classifyTree.slice(1)
}
if (this.yearChildData.length !== 0) {
@ -280,33 +280,45 @@ export default {
} else {
this.classifyTree = []
}
this.$nextTick(() => {
this.getDictsList()
Promise.all(this.user.roles.map(item => this.getRole(item.id)))
.then(roles => {
const allFondsIds = []
const fondsObj = {}
roles.forEach(role => {
role.fonds.forEach(fond => {
if (!fondsObj[fond.id]) {
fondsObj[fond.id] = fond
allFondsIds.push(fond.id)
}
})
})
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
if (allFondsIds.length !== 0) {
const defaultChecked = this.$refs.classifyTree.getCheckedNodes()
const fondsGroup = defaultChecked.filter(item => item.fondsId).map(item => item.fondsNo)
this.smartQuery.fonds_no = fondsGroup.join(',')
} else {
this.smartQuery.fonds_no = null
}
this.handlePageList()
})
.catch(error => {
console.error(error)
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
})
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
// .then(roles => {
// const allFondsIds = []
// const fondsObj = {}
// console.log(roles)
// roles.forEach(role => {
// role.fonds.forEach(fond => {
// if (!fondsObj[fond.id]) {
// fondsObj[fond.id] = fond
// allFondsIds.push(fond.id)
// }
// })
// })
// console.log(allFondsIds)
// this.$refs.classifyTree.setCheckedKeys(allFondsIds)
// if (allFondsIds.length !== 0) {
// const defaultChecked = this.$refs.classifyTree.getCheckedNodes()
// const fondsGroup = defaultChecked.filter(item => item.fondsId).map(item => item.fondsNo)
// this.smartQuery.fonds_no = fondsGroup.join(',')
// } else {
// // this.smartQuery.fonds_no = null
// FetchInitSearchFonds().then(res => {
// this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
// })
// }
// this.handlePageList()
// })
// .catch(error => {
// console.error(error)
// })
})
},
handlePageList(isQuickFilter) {
@ -378,7 +390,14 @@ export default {
})
fonds = parent
}
if (res.dictionarys.length === 0) {
this.classifyTree = []
if (fonds.length !== 0) {
this.classifyTree.push(fonds)
}
} else {
this.classifyTree = res.dictionarys.concat(fonds)
}
this.classifyLoading = false
}).catch(err => {
console.log(err)
@ -402,10 +421,14 @@ export default {
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})
})
} else {
this.smartQuery.fonds_no = fondsGroup.join(',')
}
// }
const groupedData = {}
@ -501,15 +524,6 @@ export default {
} else {
this.smartQuery.archive_year = null
}
// if (res.find(obj => obj.dictionaryCode === 'archive_year')) {
// this.smartQuery.archive_year = null
// } else {
// if (groupedData.archive_year) {
// this.smartQuery.archive_year = groupedData.archive_year.join(',')
// } else {
// this.smartQuery.archive_year = null
// }
// }
}
}
this.$nextTick(() => {

149
src/views/system/user/cart.vue

@ -0,0 +1,149 @@
<template>
<div class="app-container tab-container" style="height: calc(100vh - 140px);">
<div class="head-container" style="display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px;">
<div class="head-search" style="margin-bottom: 0;">
<el-input
v-model="keyWord"
size="small"
clearable
placeholder="输入关键字可模糊检索"
style="width: 245px;"
class="filter-item"
@clear="crud.toQuery"
@keyup.enter.native="crud.toQuery"
/>
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button>
</div>
<crudOperation>
<template v-slot:right>
<el-button size="mini" :disabled="crud.selections.length === 0">
<i class="iconfont icon-shengchengpandiandan" />
利用
</el-button>
<el-button size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">
<i class="iconfont icon-shanchu" />
删除
</el-button>
</template>
</crudOperation>
</div>
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
row-key="id"
style="width: 100%;"
height="calc(100vh - 266px)"
@row-click="clickRowHandler"
@cell-dblclick="tableDoubleClick"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column prop="title" label="题名" />
<el-table-column prop="researchType" label="档号" align="center" />
<el-table-column prop="editor1" label="门类" align="center" />
<el-table-column prop="editor2" label="分类" align="center" />
<el-table-column prop="editor2" label="层级" align="center" />
<el-table-column prop="startTime" label="加入时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.startTime | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<pagination v-if="crud.data.length !== 0" />
</div>
</template>
<script>
import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
import crudOperation from '@crud/CRUD.operation'
import { mapGetters } from 'vuex'
export default {
name: 'Cart',
components: { pagination, crudOperation },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/archivesUtilize/initborrowCar',
title: '借阅车',
crudMethod: { },
optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: false,
group: false
}
})
},
data() {
return {
keyWord: null
}
},
computed: {
...mapGetters([
'user',
'baseApi'
])
},
watch: {
},
created() {
},
methods: {
resetQuery() {
this.keyWord = null
this.crud.toQuery()
},
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.search = this.keyWord
},
toDelete(data) {
this.$confirm('此操作将删除所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = data.map(item => item.id)
const params = {
'ids': ids,
'operator': this.user.username
}
console.log(params)
// crudEditing.del(params).then((res) => {
// console.log(res)
// if (res.code !== 500) {
// this.$message({ message: '', type: 'success', offset: 8 })
// } else {
// this.$message({ message: res.message, type: 'error', offset: 8 })
// }
// this.initData()
// }).catch(err => {
// console.log(err)
// })
}).catch(() => {
})
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
tableDoubleClick(row) {
// this.currentResearch = row
// this.$refs.editingDetail.archivesTabIndex = 0
// this.$refs.editingDetail.getDetail(row)
// this.$refs.editingDetail.editingDetailVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.el-pagination{
margin: 10px 0 !important;
}
</style>
Loading…
Cancel
Save