From b12cb8a491844304605a91dc357acff856437214 Mon Sep 17 00:00:00 2001
From: Jaunty <15613469426@163.com>
Date: Mon, 12 Jul 2021 17:53:03 +0800
Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E6=8E=A5=E7=AE=A1=E7=90=86=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/config/pages/linkManage/index.vue | 240 ++++++--------------
1 file changed, 71 insertions(+), 169 deletions(-)
diff --git a/src/pages/config/pages/linkManage/index.vue b/src/pages/config/pages/linkManage/index.vue
index 969a74df0..df2ef0f22 100644
--- a/src/pages/config/pages/linkManage/index.vue
+++ b/src/pages/config/pages/linkManage/index.vue
@@ -8,11 +8,11 @@
@click="addLink"
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
size="mini">新增
-
-
-
-
-
+ 顺序调整
-
+
+
+
+
+
{
+ if (res.ok) {
+ }else {
+ this.$message.warning(res.message)
+ }
+ })
+ },
//头部删除按钮
- deleteAllLink(row) {
+ deleteAllLink() {
+ this.selectId=[]
+ for (var i=0;i {
if (res.ok) {
this.$message.success('删除成功')
this.getLink()
+ }else {
+ this.$message.warning(res.message)
}
})
}
@@ -310,9 +207,8 @@
this.$refs['sarStandardsInfoForm'].validate((valid) => {
if (valid) {
if (this.type === 1) {
- this.$http.post('sarUrl/tsUrl/add', {
- name: this.sarStandardsInfoEO.name,
- url: this.sarStandardsInfoEO.url,
+ this.$http.postData('/sarUrl/tsUrl/add', {
+ ...this.sarStandardsInfoEO,
}, {
_this: this,
loading: 'Loading'
@@ -326,7 +222,8 @@
}
})
} else {
- this.$http.put('sarUrl/tsUrl/edit', {
+ // 编辑
+ this.$http.putData('/sarUrl/tsUrl/edit', {
id: this.editId,
name: this.sarStandardsInfoEO.name,
url: this.sarStandardsInfoEO.url,
@@ -365,10 +262,15 @@
deleteLink (row) {
this.$http.delete('sarUrl/tsUrl/delete', {
id: row.id
- }, {}, res => {
+ }, {
+ _this: this,
+ loading: 'Loading'
+ }, res => {
if (res.ok) {
this.$message.success('删除成功')
this.getLink()
+ }else {
+ this.$message.warning(res.message)
}
})
},
@@ -379,7 +281,7 @@
this.editId = row.id
this.sarStandardsInfoEO.name = row.name
this.sarStandardsInfoEO.url = row.url
- this.sarStandardsInfoEO.orderBy = row.orderBy
+ this.sarStandardsInfoEO.sortId = row.sortId
this.dialogTitle = '修改链接'
this.modalshowflag = true
},
@@ -391,12 +293,12 @@
// 获取链接数据
getLink () {
- this.$http.get('sarUrl/tsUrl', {}, {
- _this: this,
- loading: 'Loading'
- }, res=> {
- this.data = res.data
- console.log(data);
+ this.$http.get('sarUrl/tsUrl', {
+ }, {
+ _this: this,
+ loading: 'Loading'
+ }, res=> {
+ this.linkList = res.data
})
},
},
@@ -407,14 +309,14 @@
\ No newline at end of file