Commit 73e04e68 authored by shen_yan_pu's avatar shen_yan_pu

Merge remote-tracking branch 'origin/zdTest' into zdTest

parents 78a3a205 c10db975
...@@ -46,7 +46,10 @@ export function addType(data) { ...@@ -46,7 +46,10 @@ export function addType(data) {
return request({ return request({
url: '/system/dict/type/add', url: '/system/dict/type/add',
method: 'post', method: 'post',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -55,9 +58,12 @@ export function updateType(data) { ...@@ -55,9 +58,12 @@ export function updateType(data) {
const businessId = data.businessId const businessId = data.businessId
data = Qs.stringify(data) data = Qs.stringify(data)
return request({ return request({
url: '/system/dict/type/update/', url: '/system/dict/type/update/' + businessId,
method: 'put', method: 'put',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -88,12 +94,12 @@ export function exportType(query) { ...@@ -88,12 +94,12 @@ export function exportType(query) {
} }
// 获取字典选择框列表 // 获取字典选择框列表
export function optionselect() { // export function optionselect() {
return request({ // return request({
url: '/authority/system/dict/type/selectFather', // url: '/authority/system/dict/type/selectFather',
method: 'get' // method: 'get'
}) // })
} // }
// 获取字典选择框列表 // 获取字典选择框列表
export function selectDictType(dictType) { export function selectDictType(dictType) {
return request({ return request({
......
import request from '@/utils/request' import request from '@/utils/request'
import Qs from 'qs'
// 查询岗位列表 // 查询岗位列表
export function listPost(query) { export function listPost(query) {
return request({ return request({
...@@ -19,19 +19,28 @@ export function getPost(postId) { ...@@ -19,19 +19,28 @@ export function getPost(postId) {
// 新增岗位 // 新增岗位
export function addPost(data) { export function addPost(data) {
data = Qs.stringify(data)
return request({ return request({
url: '/system/post/add', url: '/system/post/add',
method: 'post', method: 'post',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
// 修改岗位 // 修改岗位
export function updatePost(data) { export function updatePost(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({ return request({
url: '/system/post/update/', url: '/system/post/update/' + businessId,
method: 'put', method: 'put',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
......
...@@ -58,11 +58,11 @@ ...@@ -58,11 +58,11 @@
<div class="mb12 font-small-bold">字典参数列表</div> <div class="mb12 font-small-bold">字典参数列表</div>
<el-table v-loading="loading" :data="dataList" border> <el-table v-loading="loading" :data="dataList" border>
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">--> <!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{ scope.row.dictCode || '-' }}--> <!-- {{ scope.row.dictCode || '-' }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column :show-overflow-tooltip="true" label="参数标签" prop="dictLabel"> <el-table-column :show-overflow-tooltip="true" label="参数标签" prop="dictLabel">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dictLabel || '-' }} {{ scope.row.dictLabel || '-' }}
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<el-input v-model.trim="form.dictValue" show-word-limit maxlength="300" placeholder="请输入参数键值" /> <el-input v-model.trim="form.dictValue" show-word-limit maxlength="300" placeholder="请输入参数键值" />
</el-form-item> </el-form-item>
<el-form-item label="参数排序" prop="dictSort"> <el-form-item label="参数排序" prop="dictSort">
<el-input-number style="width: 100%" v-model="form.dictSort" controls-position="right" :min="0" /> <el-input-number v-model="form.dictSort" style="width: 100%" controls-position="right" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="参数状态" prop="status"> <el-form-item label="参数状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
<script> <script>
import { listData, getData, delData, addData, updateData, exportData, checkDictLabelUnique } from '@/api/system/dict/data' import { listData, getData, delData, addData, updateData, exportData, checkDictLabelUnique } from '@/api/system/dict/data'
import { listType, getType } from '@/api/system/dict/type' import { listType, getType } from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
export default { export default {
name: 'Data', name: 'Data',
...@@ -261,9 +262,9 @@ export default { ...@@ -261,9 +262,9 @@ export default {
const dictId = this.$route.query && this.$route.query.dictId const dictId = this.$route.query && this.$route.query.dictId
this.getType(dictId) this.getType(dictId)
this.getTypeList() this.getTypeList()
// this.getDicts('sys_normal_disable').then(response => { this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
// this.statusOptions = response.data this.statusOptions = response.data;
// }) })
}, },
methods: { methods: {
// 状态 // 状态
...@@ -415,16 +416,24 @@ export default { ...@@ -415,16 +416,24 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams
exportData(queryParams).then(response => { this.$confirm('是否确认导出所有数据项?', '警告', {
this.download(response.msg) confirmButtonText: '确定',
}).catch(function() {}) cancelButtonText: '取消',
// this.$confirm('是否确认导出所有数据项?', '提示', { type: 'warning'
// confirmButtonText: '确定', }).then(function() {
// cancelButtonText: '取消', return exportData(queryParams).then(response => {
// type: 'warning' const blob = new Blob([response])
// }).then(function() { const downloadElement = document.createElement('a')
// return exportData(queryParams) const href = window.URL.createObjectURL(blob)// 创建下载的链接
// }) downloadElement.href = href
downloadElement.download = '字典数据信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
})
} }
} }
} }
......
...@@ -55,39 +55,39 @@ ...@@ -55,39 +55,39 @@
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:dict:add']" v-hasPermi="['system:dict:add']"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" v-hasPermi="['system:dict:edit']"
icon="el-icon-edit" type="success"
size="mini" icon="el-icon-edit"
:disabled="single" size="mini"
@click="handleUpdate" :disabled="single"
v-hasPermi="['system:dict:edit']" @click="handleUpdate"
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" v-hasPermi="['system:dict:remove']"
icon="el-icon-delete" type="danger"
size="mini" icon="el-icon-delete"
:disabled="multiple" size="mini"
@click="handleDelete" :disabled="multiple"
v-hasPermi="['system:dict:remove']" @click="handleDelete"
>删除 >删除
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:dict:export']" v-hasPermi="['system:dict:export']"
type="success" type="success"
...@@ -95,16 +95,16 @@ ...@@ -95,16 +95,16 @@
size="small" size="small"
@click="handleExport" @click="handleExport"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
<div style="min-height: 445px;padding:10px"> <div style="min-height: 445px;padding:10px">
<h5 style="margin: 0 0 12px 0;font-size: 14px">字典管理列表</h5> <h5 style="margin: 0 0 12px 0;font-size: 14px">字典管理列表</h5>
<el-table v-loading="loading" border :data="typeList"> <el-table v-loading="loading" border :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="businessId"/> <el-table-column label="字典编号" align="center" prop="businessId" />
<el-table-column label="字典名称" prop="dictName" :show-overflow-tooltip="true"> <el-table-column label="字典名称" prop="dictName" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dictName || '-' }} {{ scope.row.dictName || '-' }}
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<router-link <router-link
v-if="scope.row.businessId" v-if="scope.row.businessId"
:style="{ pointerEvents: $haveAuth('system:dictConfig:list') ? '' : 'none' }" :style="{ pointerEvents: $haveAuth('system:dictConfig:list') ? '' : 'none' }"
:to="'/dictData?businessId=' + scope.row.businessId" :to="'/dict/type/data/' + scope.row.businessId"
class="link-type" class="link-type"
> >
<span :style="{color: $haveAuth('system:dictConfig:list') ? '#20a0ff' : '#333333' }">{{ scope.row.dictType }}</span> <span :style="{color: $haveAuth('system:dictConfig:list') ? '#20a0ff' : '#333333' }">{{ scope.row.dictType }}</span>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<div v-else>-</div> <div v-else>-</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat"/> <el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat" />
<el-table-column label="备注" prop="remark" :show-overflow-tooltip="true"> <el-table-column label="备注" prop="remark" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.remarks || '-' }} {{ scope.row.remarks || '-' }}
...@@ -165,10 +165,10 @@ ...@@ -165,10 +165,10 @@
<el-dialog title="字典信息" :visible.sync="open" width="500px" append-to-body @close="reset"> <el-dialog title="字典信息" :visible.sync="open" width="500px" append-to-body @close="reset">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="字典名称" prop="dictName"> <el-form-item label="字典名称" prop="dictName">
<el-input v-model.trim="form.dictName" :maxlength="30" placeholder="请输入字典名称" /> <el-input v-model.trim="form.dictName" :maxlength="30" placeholder="请输入字典名称" />
</el-form-item> </el-form-item>
<el-form-item label="字典类型" prop="dictType"> <el-form-item label="字典类型" prop="dictType">
<el-input v-model.trim="form.dictType" :maxlength="30" placeholder="请输入字典类型" /> <el-input v-model.trim="form.dictType" :maxlength="30" placeholder="请输入字典类型" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="flag"> <el-form-item label="状态" prop="flag">
<el-radio-group v-model="form.flag"> <el-radio-group v-model="form.flag">
...@@ -180,33 +180,33 @@ ...@@ -180,33 +180,33 @@
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- <el-form-item label="父字典名称">--> <!-- <el-form-item label="父字典名称">-->
<!-- <el-select v-model="form.parentId" style="width: 100%" clearable placeholder="请选择父字典类型" @change="getOptions">--> <!-- <el-select v-model="form.parentId" style="width: 100%" clearable placeholder="请选择父字典类型" @change="getOptions">-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in options"--> <!-- v-for="item in options"-->
<!-- :key="item.businessId"--> <!-- :key="item.businessId"-->
<!-- :label="item.dictName"--> <!-- :label="item.dictName"-->
<!-- :value="item.businessId"--> <!-- :value="item.businessId"-->
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item v-show="form.parentId">--> <!-- <el-form-item v-show="form.parentId">-->
<!-- <el-select v-model="form.dataId" style="width: 100%" clearable placeholder="请选择父字典类型" @visible-change="clearSelected">--> <!-- <el-select v-model="form.dataId" style="width: 100%" clearable placeholder="请选择父字典类型" @visible-change="clearSelected">-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in optionsDict"--> <!-- v-for="item in optionsDict"-->
<!-- :key="item.dictCode"--> <!-- :key="item.dictCode"-->
<!-- :label="item.dictLabel"--> <!-- :label="item.dictLabel"-->
<!-- :disabled="item.status == 1"--> <!-- :disabled="item.status == 1"-->
<!-- :value="item.dictCode"--> <!-- :value="item.dictCode"-->
<!-- >--> <!-- >-->
<!-- <span style="float: left">{{ item.dictLabel }}</span>--> <!-- <span style="float: left">{{ item.dictLabel }}</span>-->
<!-- <span v-if="item.status === '1'" style="float: right; color: #8492a6; font-size: 12px;padding-left: 10px">{{ '已停用' }}</span>--> <!-- <span v-if="item.status === '1'" style="float: right; color: #8492a6; font-size: 12px;padding-left: 10px">{{ '已停用' }}</span>-->
<!-- </el-option>--> <!-- </el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model.trim="form.remark" maxlength="200" type="textarea" placeholder="请输入内容" /> <el-input v-model.trim="form.remark" maxlength="200" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -230,6 +230,7 @@ import { listType, ...@@ -230,6 +230,7 @@ import { listType,
checkDictNameUnique, checkDictNameUnique,
selectDictType selectDictType
} from '@/api/system/dict/type' } from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
export default { export default {
name: 'Dict', name: 'Dict',
...@@ -317,7 +318,8 @@ export default { ...@@ -317,7 +318,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
dictName: undefined, dictName: undefined,
dictType: undefined dictType: undefined,
flag: undefined
// status: undefined // status: undefined
}, },
// 表单参数 // 表单参数
...@@ -343,7 +345,7 @@ export default { ...@@ -343,7 +345,7 @@ export default {
}, },
created() { created() {
this.getList() this.getList()
this.getDicts('sys_normal_disable'.toUpperCase()).then(response => { this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data this.statusOptions = response.data
}) })
optionselect().then(response => { optionselect().then(response => {
...@@ -374,7 +376,7 @@ export default { ...@@ -374,7 +376,7 @@ export default {
if (this.form.dataId) { if (this.form.dataId) {
// 如果找不到 下拉框选项中对应选中的选项 或者 下拉框选项中对应选中的选项 状态为1(停用)则将双向绑定的数据清空 // 如果找不到 下拉框选项中对应选中的选项 或者 下拉框选项中对应选中的选项 状态为1(停用)则将双向绑定的数据清空
if (!this.optionsDict.find(item => { return item.dictCode === this.form.dataId }) || if (!this.optionsDict.find(item => { return item.dictCode === this.form.dataId }) ||
this.optionsDict.find(item => { return item.dictCode === this.form.dataId }).status == 1) { this.optionsDict.find(item => { return item.dictCode === this.form.dataId }).status === 1) {
this.form.dataId = '' this.form.dataId = ''
} }
} }
...@@ -399,7 +401,7 @@ export default { ...@@ -399,7 +401,7 @@ export default {
}, },
// 字典状态字典翻译 // 字典状态字典翻译
statusFormat(row, column) { statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status) return this.selectDictLabel(this.statusOptions, row.flag)
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
...@@ -415,17 +417,19 @@ export default { ...@@ -415,17 +417,19 @@ export default {
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: '0', status: '0',
remark: undefined remark: undefined,
flag: '1'
} }
}, },
/** 查询按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
// this.dateRange = [] this.dateRange = []
this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -443,25 +447,34 @@ export default { ...@@ -443,25 +447,34 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
this.form.dictName = row.dictName const dictId = row.businessId || this.ids
this.form.dictType = row.dictType getType(dictId).then(response => {
this.form.remark = row.remark this.form = response.data
this.form.dictNameOne = row.dictName this.open = true
this.form.dictTypeOne = row.dictType this.title = '修改字典类型'
this.form.businessId = row.businessId })
const parentId = row.parentId
if (parentId) {
this.form.parentId = parentId
selectDictType(this.options.find(item => { return item.businessId === parentId }).dictType).then(response => {
this.optionsDict = response.data
})
}
if (row.dataId) {
this.form.dataId = row.dataId
}
this.open = true
this.title = 'update'
}, },
// handleUpdate(row) {
// this.reset()
// this.form.dictName = row.dictName
// this.form.dictType = row.dictType
// this.form.remark = row.remark
// this.form.dictNameOne = row.dictName
// this.form.dictTypeOne = row.dictType
// this.form.businessId = row.businessId
// const parentId = row.parentId
// if (parentId) {
// this.form.parentId = parentId
// selectDictType(this.options.find(item => { return item.businessId === parentId }).dictType).then(response => {
// this.optionsDict = response.data
// })
// }
// if (row.dataId) {
// this.form.dataId = row.dataId
// }
// this.open = true
// this.title = 'update'
// },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
...@@ -517,16 +530,24 @@ export default { ...@@ -517,16 +530,24 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams
exportType(queryParams).then(response => { this.$confirm('是否确认导出所有类型数据项?', '警告', {
this.download(response.msg) confirmButtonText: '确定',
}).catch(function() {}) cancelButtonText: '取消',
// this.$confirm('是否确认导出所有类型数据项?', '提示', { type: 'warning'
// confirmButtonText: '确定', }).then(function() {
// cancelButtonText: '取消', return exportType(queryParams).then(response => {
// type: 'warning' const blob = new Blob([response])
// }).then(function() { const downloadElement = document.createElement('a')
// return exportType(queryParams) const href = window.URL.createObjectURL(blob)// 创建下载的链接
// }) downloadElement.href = href
downloadElement.download = '字典类型信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
})
}, },
/** 清理缓存按钮操作 */ /** 清理缓存按钮操作 */
handleClearCache() { handleClearCache() {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" v-show="showSearch" label-width="68px"> <el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px">
<el-form-item label="岗位名称" prop="postName"> <el-form-item label="岗位名称" prop="postName">
<el-input <el-input
v-model="queryParams.postName" v-model="queryParams.postName"
...@@ -76,13 +76,13 @@ ...@@ -76,13 +76,13 @@
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:10px"> <div style="padding:10px">
<div class="mb12 font-small-bold">岗位管理列表</div> <div class="mb12 font-small-bold">岗位管理列表</div>
<el-table :data="postList" border> <el-table v-loading="loading" :data="postList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :show-overflow-tooltip="true" label="岗位编号" align="center" prop="businessId"> <el-table-column :show-overflow-tooltip="true" label="岗位编号" align="center" prop="businessId">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -104,10 +104,10 @@ ...@@ -104,10 +104,10 @@
{{ scope.row.postSort || '-' }} {{ scope.row.postSort || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :show-overflow-tooltip="true" label="状态" align="center" prop="flag"> <el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat">
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.flag || '-' }} <!-- {{ scope.row.flag || '-' }}-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column :show-overflow-tooltip="true" label="创建时间" align="center" prop="createDate" width="180"> <el-table-column :show-overflow-tooltip="true" label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -192,8 +192,8 @@ ...@@ -192,8 +192,8 @@
:key="dict.dictValue" :key="dict.dictValue"
:label="dict.dictValue" :label="dict.dictValue"
>{{ dict.dictLabel }} >{{ dict.dictLabel }}
<!-- <el-radio label="0">正常</el-radio>--> <!-- <el-radio label="0">正常</el-radio>-->
<!-- <el-radio label="1">停用</el-radio>--> <!-- <el-radio label="1">停用</el-radio>-->
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -316,8 +316,8 @@ export default { ...@@ -316,8 +316,8 @@ export default {
rows: 10, rows: 10,
postCode: undefined, postCode: undefined,
postName: undefined, postName: undefined,
flag: undefined, flag: undefined
status: '' // status: ''
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -436,7 +436,7 @@ export default { ...@@ -436,7 +436,7 @@ export default {
deptId: undefined, deptId: undefined,
postSort: 0, postSort: 0,
flag: '1', flag: '1',
status: '0', // status: '0',
remark: undefined, remark: undefined,
postNameAfter: undefined, postNameAfter: undefined,
postNameBefore: undefined postNameBefore: undefined
...@@ -534,16 +534,24 @@ export default { ...@@ -534,16 +534,24 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams
exportPost(queryParams).then(response => { this.$confirm('是否确认导出所有岗位数据项?', '警告', {
this.download(response.msg) confirmButtonText: '确定',
}).catch(function() { cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportPost(queryParams).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '岗位信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
}) })
// this.$confirm('是否确认导出所有职务数据项?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(function() {
// return
} }
} }
} }
......
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