From e4f452a6955e6769c9a91082aca02e4a71a7c3ec Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期三, 11 一月 2023 09:18:54 +0800
Subject: [PATCH] 违法统计导出功能添加
---
src/views/operate/images/index.vue | 98 ++++++++++++++++++++++++++++++------------------
1 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/src/views/operate/images/index.vue b/src/views/operate/images/index.vue
index d499454..1a47a4b 100644
--- a/src/views/operate/images/index.vue
+++ b/src/views/operate/images/index.vue
@@ -21,6 +21,11 @@
>
</div>
</div>
+ <div class="addBtn">
+ <el-button type="primary" @click="handleUpdateImageResource(null,'create')"
+ >鏂板</el-button
+ >
+ </div>
</div>
</header>
<main>
@@ -39,9 +44,6 @@
<el-table
ref="multipleTable"
:header-cell-style="{
- background: '#06122c',
- 'font-size': '12px',
- color: '#4b9bb7',
'font-weight': '650',
'line-height': '45px',
}"
@@ -50,7 +52,7 @@
:row-class-name="tableRowClassName"
@selection-change="tableChange"
>
- <el-table-column type="selection" min-width="5"> </el-table-column>
+ <el-table-column type="selection" min-width="5" :selectable="selectable"> </el-table-column>
<el-table-column prop="code" label="鎵�灞炰簨浠剁紪鍙�" min-width="18">
</el-table-column>
<el-table-column prop="category" label="闂绫诲埆" min-width="8">
@@ -79,7 +81,7 @@
>鏌ョ湅</span
>
<span v-if="mystatus === 3" class="line">|</span>
- <span v-if="mystatus === 3" @click="handleUpdateImageResource(scope.row, 'update')"
+ <span v-if="mystatus === 3" @click="handleUdeletepdateImageResource(scope.row, 'update')"
>淇敼</span
>
<span v-if="mystatus === 3" class="line">|</span>
@@ -118,8 +120,6 @@
<el-select
v-model="myIdx"
placeholder="鎵归噺鎿嶄綔"
- @change="selectChange"
- disabled
>
<el-option
v-for="item in options"
@@ -127,6 +127,7 @@
:label="item.label"
:value="item.value"
:disabled="item.disabled"
+ @click.native="selectChange"
>
</el-option>
</el-select>
@@ -199,14 +200,14 @@
label: "鎵归噺鎿嶄綔",
disabled: true,
},
- {
- value: 1,
- label: "鎵归噺鍚敤",
- },
- {
- value: 2,
- label: "鎵归噺绂佺敤",
- },
+ // {
+ // value: 1,
+ // label: "鎵归噺鍚敤",
+ // },
+ // {
+ // value: 2,
+ // label: "鎵归噺绂佺敤",
+ // },
{
value: 3,
label: "鎵归噺鍒犻櫎",
@@ -246,21 +247,35 @@
// 鎵归噺鍒犻櫎
mulDelete(idArr) {
- imageManagement
- .deleteImageResources({ ids: idArr })
- .then(() => {
- this.$message.success("鎿嶄綔鎴愬姛");
- this.getImageResourceList();
- })
- .catch((err) => this.$message.error(`${err}`));
+ this.$confirm("鎮ㄧ‘瀹氳鎵归噺鍒犻櫎鍥剧墖鍚�?")
+ .then((_) => {
+ this.$axios({
+ method: "delete",
+ url: "/sccg/image_resources/deletion_batch?ids=" + idArr,
+ }).then((res) => {
+ if (res.code === 200) {
+ this.$message({
+ type: "success",
+ message: "鎵归噺鍒犻櫎鍥剧墖鎴愬姛",
+ });
+ this.getImageResourceList();
+ } else {
+ this.$message({
+ type: "error",
+ message: res.message,
+ });
+ }
+ });
+ })
+ .catch((err) => {
+ console.log(err);
+ });
},
// 鎵ц涓嬫媺妗嗘搷浣�
selectChange(list) {
if (this.tempList.length !== 0) {
- if (list === 3) {
this.preMyIdx = list;
this.mulDelete(this.tempList);
- }
} else {
this.myIdx = this.preMyIdx;
this.$message({
@@ -273,7 +288,7 @@
tableChange(list) {
this.tempList = [];
list.forEach((item) => {
- this.tempList.push(item.code);
+ this.tempList.push(item.id);
});
this.all = list.length === this.tableData.length;
},
@@ -294,6 +309,7 @@
.deleteImageResource({ id: id })
.then(() => {
this.$message.success("鎿嶄綔鎴愬姛");
+ this.getImageResourceList();
})
.catch((err) => this.$message.error(`${err}`));
});
@@ -359,6 +375,13 @@
getEventSource(value) {
return EVENT_SOURCE.find((item) => item.value === value);
},
+ selectable(row,index){
+ if(this.mystatus == '1'){
+ return false;//绂佺敤鐘舵��
+ }else{
+ return true;//闈炵鐢ㄧ姸鎬�
+ }
+ },
},
};
</script>
@@ -369,7 +392,7 @@
color: #4b9bb7;
header {
- background-color: #09152f;
+ background-color: white;
.headerContent {
padding: 0 40px;
@@ -391,7 +414,7 @@
color: #1d3f57;
&::v-deep .el-input__inner {
- background-color: #09152f;
+ // background-color: #09152f;
border: 1px solid #17324c;
}
}
@@ -411,7 +434,7 @@
}
.addBtn {
- background-color: #eb5d01;
+ // background-color: #eb5d01;
border: none;
border-radius: 20px;
padding: 12px 30px;
@@ -420,12 +443,12 @@
}
&::v-deep .el-input__inner {
- background-color: #09152f;
+ // background-color: #09152f;
border: 1px solid #17324c;
}
main {
- background-color: #09152f;
+ // background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
@@ -451,9 +474,10 @@
}
.is-active {
- background-color: #070f22;
+ // background-color: #070f22;
border-radius: 4px;
- color: #fff;
+ color: #333;
+ font-size: 500;
}
}
@@ -507,7 +531,7 @@
&::v-deep li,
&::v-deep .btn-prev,
&::v-deep .btn-next {
- background-color: #071f39;
+ // background-color: #071f39;
color: #4b9bb7;
}
@@ -520,8 +544,8 @@
}
.el-table {
- color: #4b9bb7;
- font-size: 10px;
+ // color: #4b9bb7;
+ // font-size: 10px;
&::v-deep .cell {
text-overflow: ellipsis;
@@ -548,7 +572,7 @@
}
:deep(.el-range-input) {
- background-color: #09152f;
+ // background-color: #09152f;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0