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

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

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