Merge pull request 'dev' (#1) from integrated_whb/integrated_whb_admin_vue:dev into dev
Reviewed-on: #1dev
commit
cbe6466103
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="position: relative">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
ref="cascader"
|
ref="cascader"
|
||||||
:value="value"
|
:value="value"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
:clearable = "clearable"
|
:clearable = "clearable"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="cascaderChange" />
|
@change="cascaderChange" />
|
||||||
<i v-show="loading" class="el-icon-loading"/>
|
<i v-show="loading" class="el-icon-loading" style="position: absolute;top: 10px;right: 25px;"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-if="visible" :visible.sync="visible" :title="title" width="600px" @close="close">
|
<el-dialog v-if="visible" :visible.sync="visible" :title="title" width="600px" @close="close">
|
||||||
<el-form v-loading="loading" ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
|
<el-form v-loading="loading" ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
|
||||||
<el-form-item label="行业类型" prop="INDUSTRY_TYPE_TREE">
|
<el-form-item label="行业类型" prop="INDUSTRY_TYPE_ARR">
|
||||||
<cascader-dict
|
<cascader-dict
|
||||||
ref="refIndustryType"
|
ref="refIndustryType"
|
||||||
v-model = "form.INDUSTRY_TYPE_ARR"
|
v-model = "form.INDUSTRY_TYPE_ARR"
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<el-form-item label="标准名称" prop="CHECK_STANDARD_NAME">
|
<el-form-item label="标准名称" prop="CHECK_STANDARD_NAME">
|
||||||
<el-input id="CHECK_STANDARD_NAME" ref="CHECK_STANDARD_NAME" v-model="form.CHECK_STANDARD_NAME" maxlength="255" placeholder="这里输入标准名称..." title="标准名称"/>
|
<el-input id="CHECK_STANDARD_NAME" ref="CHECK_STANDARD_NAME" v-model="form.CHECK_STANDARD_NAME" maxlength="255" placeholder="这里输入标准名称..." title="标准名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态" prop="COMMON_STATUS">
|
||||||
<el-select v-model="form.COMMON_STATUS" placeholder="状态" style="width: 100px" class="filter-item">
|
<el-select v-model="form.COMMON_STATUS" placeholder="状态" style="width: 100px" class="filter-item">
|
||||||
<el-option v-for="item in commonStatusList" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in commonStatusList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
|
@ -1,56 +1,62 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<el-row :gutter="20">
|
<div class="filter-row mb-10">
|
||||||
<el-form label-width="80px">
|
<el-form label-width="80px">
|
||||||
<el-col :span="8">
|
<el-row :gutter="20">
|
||||||
<el-form-item label="行业类型">
|
<el-col :span="6">
|
||||||
<cascader-dict
|
<el-form-item label="行业类型">
|
||||||
v-model = "searchForm.INDUSTRY_TYPE_ARR"
|
<cascader-dict
|
||||||
:form.sync="searchForm"
|
v-model = "searchForm.INDUSTRY_TYPE_ARR"
|
||||||
:dict-id = "dictId"
|
:form.sync="searchForm"
|
||||||
/>
|
:dict-id = "dictId"
|
||||||
</el-form-item>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="6">
|
</el-col>
|
||||||
<el-form-item label="标准名称">
|
<el-col :span="7">
|
||||||
<el-input v-model="searchForm.CHECK_STANDARD_NAME" placeholder="搜索标准名称..." class="filter-item" />
|
<el-form-item label="标准名称">
|
||||||
</el-form-item>
|
<el-input v-model="searchForm.CHECK_STANDARD_NAME" placeholder="搜索标准名称..." class="filter-item" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="6">
|
</el-col>
|
||||||
<el-form-item label="导入时间">
|
</el-row>
|
||||||
<el-date-picker
|
<el-row :gutter="20">
|
||||||
v-model="searchForm.CREATE_TIME"
|
<el-col :span="6">
|
||||||
type="daterange"
|
<el-form-item label="导入时间">
|
||||||
range-separator="至"
|
<el-date-picker
|
||||||
start-placeholder="开始日期"
|
v-model="searchForm.CREATE_TIME"
|
||||||
end-placeholder="结束日期"
|
type="daterange"
|
||||||
format="yyyy-MM-dd"
|
range-separator="至"
|
||||||
value-format="yyyy-MM-dd"/>
|
start-placeholder="开始日期"
|
||||||
</el-form-item>
|
end-placeholder="结束日期"
|
||||||
</el-col>
|
format="yyyy-MM-dd"
|
||||||
<el-col :span="6">
|
value-format="yyyy-MM-dd"/>
|
||||||
<el-form-item label="状态">
|
</el-form-item>
|
||||||
<el-select v-model="searchForm.COMMON_STATUS" placeholder="状态" clearable style="width: 100px" class="filter-item">
|
</el-col>
|
||||||
<el-option v-for="item in commonStatusList" :key="item.id" :label="item.name" :value="item.id" />
|
<el-col :span="5">
|
||||||
</el-select>
|
<el-form-item label="状态">
|
||||||
</el-form-item>
|
<el-select v-model="searchForm.COMMON_STATUS" placeholder="状态" clearable style="width: 100%" class="filter-item">
|
||||||
</el-col>
|
<el-option v-for="item in commonStatusList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
<el-col :span="6" >
|
</el-select>
|
||||||
<el-form-item label-width="10px">
|
</el-form-item>
|
||||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
</el-col>
|
||||||
搜索
|
<el-col :span="6" >
|
||||||
</el-button>
|
<el-form-item label-width="10px">
|
||||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh-left" @click="resetting">
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||||
重置
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-document-add" @click="importExcel('import')">
|
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh-left" @click="resetting">
|
||||||
导入标准表
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</div>
|
||||||
|
<div class="filter-flot">
|
||||||
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-document-add" @click="importExcel('import')">
|
||||||
|
导入标准表
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -80,16 +86,18 @@
|
||||||
{{ row.COMMON_STATUS ? (row.COMMON_STATUS === 1 ? '有效' : '停用') : '' }}
|
{{ row.COMMON_STATUS ? (row.COMMON_STATUS === 1 ? '有效' : '停用') : '' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="320">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20" style="margin-bottom: 5px">
|
||||||
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)">查看</el-button>
|
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)">查看</el-button>
|
||||||
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="importExcel('reimport', row)">重新导入</el-button>
|
|
||||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="importExcel('appendImport', row)">追加导入</el-button>
|
|
||||||
<el-button type="success" icon="el-icon-tickets" size="mini" @click="getCommonItem(row)">清单详细</el-button>
|
|
||||||
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||||
<el-button v-show="del" :disabled="row.COUNT_CUSTOM !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)">删除</el-button>
|
<el-button v-show="del" :disabled="row.COUNT_CUSTOM !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)">删除</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-button type="success" icon="el-icon-tickets" size="mini" @click="getCommonItem(row)">清单详细</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="importExcel('reimport', row)">重新导入</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="importExcel('appendImport', row)">追加导入</el-button>
|
||||||
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -312,3 +320,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.filter-container
|
||||||
|
position: relative
|
||||||
|
.filter-flot
|
||||||
|
position: absolute
|
||||||
|
padding-bottom: 33px
|
||||||
|
right: 0
|
||||||
|
bottom: 0
|
||||||
|
</style>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)">查看</el-button>
|
<el-button type="success" icon="el-icon-view" size="mini" @click="getInfo(row)">查看</el-button>
|
||||||
<el-button v-show="edit" :disabled="row.COUNT_USE !== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
<el-button v-show="edit" :disabled="row.COUNT_USE !== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||||
<el-button v-show="del" :disabled="row.COUNT_USE !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.COMMON_ID)">删除</el-button>
|
<el-button v-show="del" :disabled="row.COUNT_USE !== 0" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.DICTIONARY_ID)">删除</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -238,7 +238,8 @@ export default {
|
||||||
{ title: '教育培训', model: 'educationAndTraining' },
|
{ title: '教育培训', model: 'educationAndTraining' },
|
||||||
{ title: '高危作业管理', model: 'highRisk' },
|
{ title: '高危作业管理', model: 'highRisk' },
|
||||||
{ title: '监测预警', model: 'monitor' },
|
{ title: '监测预警', model: 'monitor' },
|
||||||
{ title: '综合管理', model: 'comprehensive' }
|
{ title: '综合管理', model: 'comprehensive' },
|
||||||
|
{ title: '定位管理', model: 'positioning' }
|
||||||
],
|
],
|
||||||
dialog: {
|
dialog: {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog :visible.sync="visible" :title="title" width="600px">
|
||||||
|
<el-form v-loading="loading" ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
|
||||||
|
<el-form-item label="编号" prop="TASK_NUM">
|
||||||
|
<el-input id="TASK_NUM" ref="TASK_NUM" v-model="form.TASK_NUM" placeholder="这里输入隐患部位..." title="隐患部位"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述" prop="TERM_DESCRIBE">
|
||||||
|
<el-input id="TERM_DESCRIBE" ref="TERM_DESCRIBE" v-model="form.TERM_DESCRIBE" type="textarea" placeholder="这里输入描述..." title="描述"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="归属类型" prop="WORK_TYPE">
|
||||||
|
<el-select v-model="form.WORK_TYPE" clearable placeholder="请选择">
|
||||||
|
<el-option value="1" label="主要负责人" />
|
||||||
|
<el-option value="2" label="技术负责人" />
|
||||||
|
<el-option value="3" label="操作负责人" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="SORT">
|
||||||
|
<el-input id="SORT" ref="SORT" v-model="form.SORT" maxlength="255" placeholder="这里输入排序..." title="排序"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="close">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||||
|
import { requestFN } from '@/utils/request'
|
||||||
|
import waves from '@/directive/waves'
|
||||||
|
export default {
|
||||||
|
components: { Pagination },
|
||||||
|
directives: { waves },
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
visible: false,
|
||||||
|
dialogType: 'add',
|
||||||
|
form: {
|
||||||
|
TASK_NUM: '',
|
||||||
|
TERM_DESCRIBE: '',
|
||||||
|
WORK_TYPE: '',
|
||||||
|
SORT: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
TASK_NUM: [{ required: true, message: '编号不能为空', trigger: 'blur' },
|
||||||
|
{ pattern: /^[0-9]{1,2}$/,
|
||||||
|
message: '编号必须是1~2位数字' }],
|
||||||
|
TERM_DESCRIBE: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
|
WORK_TYPE: [{ required: true, message: '归属类型不能为空', trigger: 'blur' }],
|
||||||
|
SORT: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(e) {
|
||||||
|
this.visible = true
|
||||||
|
if (e) {
|
||||||
|
this.dialogType = 'edit'
|
||||||
|
this.form = e
|
||||||
|
}
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true
|
||||||
|
requestFN(
|
||||||
|
'/hiddenTermLibrary/' + this.dialogType, this.form
|
||||||
|
).then((data) => {
|
||||||
|
this.loading = false
|
||||||
|
this.close()
|
||||||
|
this.$emit('beforeClose', '')
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
}).catch((e) => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
TASK_NUM: '',
|
||||||
|
TERM_DESCRIBE: '',
|
||||||
|
WORK_TYPE: '',
|
||||||
|
SORT: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
this.form = {
|
||||||
|
TASK_NUM: '',
|
||||||
|
TERM_DESCRIBE: '',
|
||||||
|
WORK_TYPE: '',
|
||||||
|
SORT: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,236 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="filter-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-form label-width="80px">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="描述">
|
||||||
|
<el-input v-model="form.KEYWORDS" placeholder="按关键字查询" class="filter-item" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="归属类型">
|
||||||
|
<el-select v-model="form.WORK_TYPE" clearable placeholder="请选择">
|
||||||
|
<el-option value="1" label="主要负责人" />
|
||||||
|
<el-option value="2" label="技术负责人" />
|
||||||
|
<el-option value="3" label="操作负责人" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" >
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
<el-button v-waves class="filter-item" type="success" icon="el-icon-search" @click="resetting">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="varList"
|
||||||
|
:row-key="getRowKey"
|
||||||
|
:header-cell-style="{
|
||||||
|
'font-weight': 'bold',
|
||||||
|
'color': '#000'
|
||||||
|
}"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
|
||||||
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
|
<el-table-column prop="TERM_DESCRIBE" label="描述" />
|
||||||
|
<el-table-column label="归属类型" >
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<span v-if="row.WORK_TYPE === '1'">主要负责人</span>
|
||||||
|
<span v-if="row.WORK_TYPE === '2'">技术负责人</span>
|
||||||
|
<span v-if="row.WORK_TYPE === '3'">操作负责人</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CREATE_TIME" label="创建时间" />
|
||||||
|
<el-table-column prop="SORT" label="顺序" />
|
||||||
|
<el-table-column label="操作" align="center" width="250">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.TERM_LIBRARY_ID)">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="page-btn-group">
|
||||||
|
<div>
|
||||||
|
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||||
|
<el-button v-show="false" type="danger" icon="el-icon-delete" plain @click="batchDel">删除</el-button>
|
||||||
|
</div>
|
||||||
|
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
<edit ref="edit" :title="title" href="edit" @beforeClose="getList"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||||
|
import { requestFN } from '@/utils/request'
|
||||||
|
import waves from '@/directive/waves'
|
||||||
|
import edit from './edit.vue'
|
||||||
|
export default {
|
||||||
|
components: { edit, Pagination },
|
||||||
|
directives: { waves },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listLoading: true,
|
||||||
|
add: false,
|
||||||
|
del: false,
|
||||||
|
edit: false,
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
KEYWORDS: '',
|
||||||
|
varList: [],
|
||||||
|
title: '新增',
|
||||||
|
form: {
|
||||||
|
KEYWORDS: '',
|
||||||
|
WORK_TYPE: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getRowKey(row) {
|
||||||
|
return row.HIDDEN_LIBRARY_ID
|
||||||
|
},
|
||||||
|
getQuery() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
requestFN(
|
||||||
|
'/hiddenTermLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||||
|
this.form
|
||||||
|
).then((data) => {
|
||||||
|
this.listLoading = false
|
||||||
|
this.varList = data.varList
|
||||||
|
this.total = data.page.totalResult
|
||||||
|
this.hasButton()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.$refs.edit.init()
|
||||||
|
this.title = '新增'
|
||||||
|
},
|
||||||
|
handleEdit(row) {
|
||||||
|
this.$refs.edit.init(row)
|
||||||
|
this.title = '编辑'
|
||||||
|
},
|
||||||
|
handleDelete(id) {
|
||||||
|
this.$confirm('确定要删除吗?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.listLoading = true
|
||||||
|
requestFN(
|
||||||
|
'/hiddenTermLibrary/delete',
|
||||||
|
{ TERM_LIBRARY_ID: id }
|
||||||
|
).then(() => {
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.listLoading = false
|
||||||
|
this.varList = []
|
||||||
|
this.listQuery.page = 1
|
||||||
|
this.getList()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
batchDel() {
|
||||||
|
const _selectData = this.$refs.multipleTable.selection
|
||||||
|
if (_selectData == null || _selectData.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选中要删除的项...',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const ids = _selectData.map((item, index) => {
|
||||||
|
return item.TERM_LIBRARY_ID
|
||||||
|
}).join(',')
|
||||||
|
|
||||||
|
this.$confirm('确定要删除选中的数据吗?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.listLoading = true
|
||||||
|
requestFN(
|
||||||
|
'/hiddenTermLibrary/deleteAll',
|
||||||
|
{
|
||||||
|
DATA_IDS: ids
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.listLoading = false
|
||||||
|
this.varList = []
|
||||||
|
this.listQuery.page = 1
|
||||||
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
this.getList()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
hasButton: function() {
|
||||||
|
var keys = 'hiddenTermLibrary:add,hiddenTermLibrary:del,hiddenTermLibrary:edit,toExcel'
|
||||||
|
requestFN(
|
||||||
|
'/head/hasButton',
|
||||||
|
{
|
||||||
|
keys: keys
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
this.add = data.hiddenTermLibraryfhadminadd // 新增权限
|
||||||
|
this.del = data.hiddenTermLibraryfhadmindel // 删除权限
|
||||||
|
this.edit = data.hiddenTermLibraryfhadminedit // 修改权限
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetting() {
|
||||||
|
this.form = {
|
||||||
|
KEYWORDS: '',
|
||||||
|
WORK_TYPE: ''
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
getResult(e) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<List v-show="activeName==='List'" ref="list" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import List from './components/list.vue'
|
||||||
|
export default {
|
||||||
|
components: { List },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'List'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
Loading…
Reference in New Issue