Commit 7c140b98 authored by 张伯涛's avatar 张伯涛

字典和字典类型的增删改查,导出功能调节

parent 81c27d61
...@@ -30,7 +30,10 @@ export function getDicts(dictType) { ...@@ -30,7 +30,10 @@ export function getDicts(dictType) {
export function checkDictLabelUnique(dictLabel) { export function checkDictLabelUnique(dictLabel) {
return request({ return request({
url: '/system/dict/data/checkDictLabelUnique?dictLabel=' + dictLabel, url: '/system/dict/data/checkDictLabelUnique?dictLabel=' + dictLabel,
method: 'get' method: 'get',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -40,7 +43,10 @@ export function addData(data) { ...@@ -40,7 +43,10 @@ export function addData(data) {
return request({ return request({
url: '/system/dict/data/add', url: '/system/dict/data/add',
method: 'post', method: 'post',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -51,7 +57,10 @@ export function updateData(data) { ...@@ -51,7 +57,10 @@ export function updateData(data) {
return request({ return request({
url: '/system/dict/data/update/' + businessId, url: '/system/dict/data/update/' + businessId,
method: 'put', method: 'put',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -59,14 +68,17 @@ export function updateData(data) { ...@@ -59,14 +68,17 @@ export function updateData(data) {
export function delData(dictCode) { export function delData(dictCode) {
return request({ return request({
url: '/system/dict/data/deleteLogical/' + dictCode, url: '/system/dict/data/deleteLogical/' + dictCode,
method: 'delete' method: 'delete',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
// 导出字典数据 // 导出字典数据
export function exportData(query) { export function exportData(query) {
return request({ return request({
url: '/system/dict/data/export' + query.dictType, url: '/system/dict/data/export/' + query.dictType,
method: 'get', method: 'get',
params: query, params: query,
responseType: 'blob' responseType: 'blob'
......
...@@ -62,6 +62,12 @@ Vue.prototype.$uploadFile = uploadPublic ...@@ -62,6 +62,12 @@ Vue.prototype.$uploadFile = uploadPublic
Vue.prototype.$haveAuth = includePermission Vue.prototype.$haveAuth = includePermission
// set ElementUI lang to EN // set ElementUI lang to EN
Vue.prototype.$axios = xhr Vue.prototype.$axios = xhr
// 未解析的函数或方法 msgSuccess(),需添加以下代码
Vue.prototype.msgSuccess = function(msg) {
this.$message({ showClose: true, message: msg, type: 'success' })
}
Vue.prototype.$parseDate = (value, format) => { Vue.prototype.$parseDate = (value, format) => {
if (!value || value === '') { if (!value || value === '') {
return '-' return '-'
......
This diff is collapsed.
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</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="remarks" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.remarks || '-' }} {{ scope.row.remarks || '-' }}
</template> </template>
...@@ -205,8 +205,8 @@ ...@@ -205,8 +205,8 @@
<!-- </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="remarks">
<el-input v-model.trim="form.remark" maxlength="200" type="textarea" placeholder="请输入内容" /> <el-input v-model.trim="form.remarks" 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">
...@@ -417,7 +417,7 @@ export default { ...@@ -417,7 +417,7 @@ export default {
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: '0', status: '0',
remark: undefined, remarks: undefined,
flag: '1' flag: '1'
} }
}, },
...@@ -454,27 +454,6 @@ export default { ...@@ -454,27 +454,6 @@ export default {
this.title = '修改字典类型' this.title = '修改字典类型'
}) })
}, },
// 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 => {
......
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