|
@@ -63,11 +63,14 @@
|
|
|
<el-link type="danger" @click="handleDelete(row)">删除</el-link>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-link v-if="row.activityOrder!=1" type="primary" @click="handleDelete(row)">上移</el-link>
|
|
|
- <el-link v-else type="primary" @click="handleDelete(row)">上移</el-link>
|
|
|
+ <el-link v-if="row.activityOrder!=1" type="primary" @click="handleUp(row)">
|
|
|
+ 上移
|
|
|
+ </el-link>
|
|
|
+ <span v-else>上移</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-link type="primary" @click="handleDelete(row)">下移</el-link>
|
|
|
+ <span v-if="tableData.length==row.activityOrder">下移</span>
|
|
|
+ <el-link v-else type="primary" @click="handleDown(row)">下移</el-link>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
@@ -199,12 +202,13 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.modalTitle = "新增";
|
|
|
this.businessKey = "";
|
|
|
+ this.processTemplateId = this.processTemplateId;
|
|
|
this.showModal = true;
|
|
|
},
|
|
|
handleEdit(record) {
|
|
|
this.modalTitle = "编辑";
|
|
|
this.businessKey = record.id;
|
|
|
- this.processTemplateId =
|
|
|
+ this.processTemplateId = this.processTemplateId;
|
|
|
this.showModal = true;
|
|
|
},
|
|
|
handleDelete(record) {
|
|
@@ -268,6 +272,33 @@ export default {
|
|
|
this.changePage(this.pageIndex);
|
|
|
}
|
|
|
},
|
|
|
+ handleUp(row){
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("id", row.id);
|
|
|
+ formData.append("isUp", true);
|
|
|
+
|
|
|
+ processActivityApi.moveActivityOrder(formData).then(response => {
|
|
|
+ var jsonData = response.data;
|
|
|
+ if (jsonData.result) {
|
|
|
+ this.changePage(this.pageIndex);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ handleDown(row){
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("id", row.id);
|
|
|
+ formData.append("isUp", false);
|
|
|
+
|
|
|
+ processActivityApi.moveActivityOrder(formData).then(response => {
|
|
|
+ var jsonData = response.data;
|
|
|
+ if (jsonData.result) {
|
|
|
+ this.changePage(this.pageIndex);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
mounted: function() {
|
|
|
this.processTemplateId = this.$route.query.processTemplateId;
|