罗斌杰 2 years ago
parent
commit
a756964328
  1. 81
      src/views/basic-dictionary/ResultStatus.vue

81
src/views/basic-dictionary/ResultStatus.vue

@ -85,16 +85,11 @@
></div> ></div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" width="180">
<template slot-scope="scope">
<el-table-column label="操作" width="" align="center">
<template>
<el-tag <el-tag
class="move" class="move"
style="
cursor: move;
background-color: rgb(245, 245, 245);
border: none;
"
@dragstart="handleEdit(scope.row)"
style="cursor: move;background-color: rgb(245, 245, 245);border:none"
draggable="true" draggable="true"
> >
<i <i
@ -103,7 +98,7 @@
></i> ></i>
</el-tag> </el-tag>
</template> </template>
</el-table-column> -->
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
@ -119,6 +114,22 @@
<el-button type="" @click="editpopup" class="commonbutton" <el-button type="" @click="editpopup" class="commonbutton"
>编辑</el-button >编辑</el-button
> >
<div style="margin-top: 10px">
<el-button type="" @click="topping" class="commonbutton">置顶</el-button>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="toppings" class="commonbutton">置底</el-button>
</div>
<div style="margin-top: 10px">
<el-button type="" :disabled="isshow" @click="assertion" class="commonbutton"
>排序</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" :disabled="isshow" @click="cancellation" class="commonbutton"
>取消</el-button
>
</div>
</div> </div>
<!-- 分页 --> <!-- 分页 -->
@ -450,14 +461,15 @@ export default {
this.tableData.forEach((item, index) => { this.tableData.forEach((item, index) => {
// index 0 displayOrder // index 0 displayOrder
// const currentDisplayOrder = this.tableData.length -1 // const currentDisplayOrder = this.tableData.length -1
const currentDisplayOrder = this.initTableData[index].displayOrder;
if (item.displayOrder != currentDisplayOrder) {
// const currentDisplayOrder = this.initTableData[index].displayOrder;
// if (item.displayOrder != currentDisplayOrder) {
// displayOrder // displayOrder
result.push({
id: item.resultStatusId,
displayOrder: currentDisplayOrder,
});
}
result.push({ id: item.id, displayOrder: index+1 });
// result.push({
// id: item.resultStatusId,
// displayOrder: currentDisplayOrder,
// });
// }
}); });
sortstatus({ itemList: result }).then((res) => { sortstatus({ itemList: result }).then((res) => {
if (res.code != -1) { if (res.code != -1) {
@ -477,6 +489,10 @@ export default {
animation: 300, animation: 300,
// //
// draggable: ".module-manager .el-table__row", // draggable: ".module-manager .el-table__row",
onChoose({oldIndex}){
_this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
_this.rowclick(_this.tableData[oldIndex])
},
onEnd({ newIndex, oldIndex }) { onEnd({ newIndex, oldIndex }) {
// console.log(arr); // console.log(arr);
_this.isshow = false; _this.isshow = false;
@ -494,14 +510,41 @@ export default {
}); });
}, },
// //
topping(row, t) {
stateBottomTop(row.resultStatusId, t).then((res) => {
topping() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
stateBottomTop(this.form.id, 1).then((res) => {
if(res.code!=-1){ if(res.code!=-1){
this.getlist(); this.getlist();
this.$message.success("操作成功");
this.$message.success('操作成功')
} }
}); });
}
}, },
toppings() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
stateBottomTop(this.form.id, 2).then((res) => {
if(res.code!=-1){
this.getlist();
this.$message.success('操作成功')
}
});
}
},
//
// topping(row, t) {
// stateBottomTop(row.resultStatusId, t).then((res) => {
// if (res.code != -1) {
// this.getlist();
// this.$message.success("");
// }
// });
// },
// //
delsrts(row) { delsrts(row) {
deletedstate(row.resultStatusId).then((res) => { deletedstate(row.resultStatusId).then((res) => {

Loading…
Cancel
Save