Commit 456bf9e9 by 姜雷

添加排序

parent 8536366b
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="purpose" label="用途" min-width="120"> <el-table-column prop="purpose" label="用途" min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="sortId" label="排序" min-width="50"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="80" align="center"> <el-table-column fixed="right" label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button> <el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button>
...@@ -35,6 +36,9 @@ ...@@ -35,6 +36,9 @@
<el-form-item label="用途" label-width="200px"> <el-form-item label="用途" label-width="200px">
<el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" label-width="200px">
<el-input-number v-model.trim="selected.sortId" :controls="false" :precision="0" :min="0" :max="1000" clearable></el-input-number>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="resetEditDialog">取 消</el-button> <el-button @click="resetEditDialog">取 消</el-button>
...@@ -78,6 +82,7 @@ export default { ...@@ -78,6 +82,7 @@ export default {
id: '', id: '',
name: '', name: '',
purpose: '', purpose: '',
sortId: null,
}; };
}, },
fetchList(entity) { fetchList(entity) {
...@@ -93,6 +98,7 @@ export default { ...@@ -93,6 +98,7 @@ export default {
id: data.row.id, id: data.row.id,
name: data.row.name, name: data.row.name,
purpose: data.row.purpose, purpose: data.row.purpose,
sortId: data.row.sortId,
}; };
} else { } else {
this.initSelected(); this.initSelected();
...@@ -114,6 +120,7 @@ export default { ...@@ -114,6 +120,7 @@ export default {
id: this.selected.id, id: this.selected.id,
name: this.selected.name, name: this.selected.name,
purpose: this.selected.purpose, purpose: this.selected.purpose,
sortId: this.selected.sortId,
}; };
if (this.editType) { if (this.editType) {
updateSetting({ ...entity, type: this.type }) updateSetting({ ...entity, type: this.type })
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="purpose" label="用途" min-width="120"> <el-table-column prop="purpose" label="用途" min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="sortId" label="排序" min-width="50"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="80" align="center"> <el-table-column fixed="right" label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button> <el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button>
...@@ -35,6 +36,9 @@ ...@@ -35,6 +36,9 @@
<el-form-item label="用途" label-width="200px"> <el-form-item label="用途" label-width="200px">
<el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" label-width="200px">
<el-input-number v-model.trim="selected.sortId" :controls="false" :precision="0" :min="0" :max="1000" clearable></el-input-number>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="resetEditDialog">取 消</el-button> <el-button @click="resetEditDialog">取 消</el-button>
...@@ -78,6 +82,7 @@ export default { ...@@ -78,6 +82,7 @@ export default {
id: '', id: '',
name: '', name: '',
purpose: '', purpose: '',
sortId: 0,
}; };
}, },
fetchList(entity) { fetchList(entity) {
...@@ -93,6 +98,7 @@ export default { ...@@ -93,6 +98,7 @@ export default {
id: data.row.id, id: data.row.id,
name: data.row.name, name: data.row.name,
purpose: data.row.purpose, purpose: data.row.purpose,
sortId: data.row.sortId,
}; };
} else { } else {
this.initSelected(); this.initSelected();
...@@ -114,6 +120,7 @@ export default { ...@@ -114,6 +120,7 @@ export default {
id: this.selected.id, id: this.selected.id,
name: this.selected.name, name: this.selected.name,
purpose: this.selected.purpose, purpose: this.selected.purpose,
sortId: this.selected.sortId,
}; };
if (this.editType) { if (this.editType) {
updateSetting({ ...entity, type: this.type }) updateSetting({ ...entity, type: this.type })
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="purpose" label="用途" min-width="120"> <el-table-column prop="purpose" label="用途" min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="sortId" label="排序" min-width="50"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="80" align="center"> <el-table-column fixed="right" label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button> <el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button>
...@@ -35,6 +36,9 @@ ...@@ -35,6 +36,9 @@
<el-form-item label="用途" label-width="200px"> <el-form-item label="用途" label-width="200px">
<el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" label-width="200px">
<el-input-number v-model.trim="selected.sortId" :controls="false" :precision="0" :min="0" :max="1000" clearable></el-input-number>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="resetEditDialog">取 消</el-button> <el-button @click="resetEditDialog">取 消</el-button>
...@@ -78,6 +82,7 @@ export default { ...@@ -78,6 +82,7 @@ export default {
id: '', id: '',
name: '', name: '',
purpose: '', purpose: '',
sortId: null,
}; };
}, },
fetchList(entity) { fetchList(entity) {
...@@ -93,6 +98,7 @@ export default { ...@@ -93,6 +98,7 @@ export default {
id: data.row.id, id: data.row.id,
name: data.row.name, name: data.row.name,
purpose: data.row.purpose, purpose: data.row.purpose,
sortId: data.row.sortId,
}; };
} else { } else {
this.initSelected(); this.initSelected();
...@@ -114,6 +120,7 @@ export default { ...@@ -114,6 +120,7 @@ export default {
id: this.selected.id, id: this.selected.id,
name: this.selected.name, name: this.selected.name,
purpose: this.selected.purpose, purpose: this.selected.purpose,
sortId: this.selected.sortId,
}; };
if (this.editType) { if (this.editType) {
updateSetting({ ...entity, type: this.type }) updateSetting({ ...entity, type: this.type })
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="purpose" label="用途" min-width="120"> <el-table-column prop="purpose" label="用途" min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="sortId" label="排序" min-width="50"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="80" align="center"> <el-table-column fixed="right" label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button> <el-button type="primary" size="mini" class="operationBtnWidth" @click="showEditDialog(1, scope)">修改</el-button>
...@@ -35,6 +36,9 @@ ...@@ -35,6 +36,9 @@
<el-form-item label="用途" label-width="200px"> <el-form-item label="用途" label-width="200px">
<el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input> <el-input v-model.trim="selected.purpose" placeholder="请输入用途" :maxlength="20" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" label-width="200px">
<el-input-number v-model.trim="selected.sortId" :controls="false" :precision="0" :min="0" :max="1000" clearable></el-input-number>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="resetEditDialog">取 消</el-button> <el-button @click="resetEditDialog">取 消</el-button>
...@@ -78,6 +82,7 @@ export default { ...@@ -78,6 +82,7 @@ export default {
id: '', id: '',
name: '', name: '',
purpose: '', purpose: '',
sortId: 0,
}; };
}, },
fetchList(entity) { fetchList(entity) {
...@@ -93,6 +98,7 @@ export default { ...@@ -93,6 +98,7 @@ export default {
id: data.row.id, id: data.row.id,
name: data.row.name, name: data.row.name,
purpose: data.row.purpose, purpose: data.row.purpose,
sortId: data.row.sortId,
}; };
} else { } else {
this.initSelected(); this.initSelected();
...@@ -114,6 +120,7 @@ export default { ...@@ -114,6 +120,7 @@ export default {
id: this.selected.id, id: this.selected.id,
name: this.selected.name, name: this.selected.name,
purpose: this.selected.purpose, purpose: this.selected.purpose,
sortId: this.selected.sortId,
}; };
if (this.editType) { if (this.editType) {
updateSetting({ ...entity, type: this.type }) updateSetting({ ...entity, type: this.type })
......
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