From a3b4eb017a0f948348ef7732267c7ed0d4bca8c0 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期二, 12 三月 2024 16:15:27 +0800 Subject: [PATCH] bug修改 --- src/views/operate/images/index.vue | 147 +++++++++++++++++++++++++++---------------------- 1 files changed, 81 insertions(+), 66 deletions(-) diff --git a/src/views/operate/images/index.vue b/src/views/operate/images/index.vue index 1a47a4b..ccef39d 100644 --- a/src/views/operate/images/index.vue +++ b/src/views/operate/images/index.vue @@ -22,10 +22,12 @@ </div> </div> <div class="addBtn"> - <el-button type="primary" @click="handleUpdateImageResource(null,'create')" - >鏂板</el-button - > - </div> + <el-button + type="primary" + @click="handleUpdateImageResource(null, 'create')" + >鏂板</el-button + > + </div> </div> </header> <main> @@ -42,8 +44,11 @@ </div> <!-- 鏁版嵁灞曠ず --> <el-table + border + stripe ref="multipleTable" :header-cell-style="{ + background: '#F5F5F5', 'font-weight': '650', 'line-height': '45px', }" @@ -52,7 +57,12 @@ :row-class-name="tableRowClassName" @selection-change="tableChange" > - <el-table-column type="selection" min-width="5" :selectable="selectable"> </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"> @@ -81,11 +91,15 @@ >鏌ョ湅</span > <span v-if="mystatus === 3" class="line">|</span> - <span v-if="mystatus === 3" @click="handleUdeletepdateImageResource(scope.row, 'update')" + <span + v-if="mystatus === 3" + @click="handleUdeletepdateImageResource(scope.row, 'update')" >淇敼</span > - <span v-if="mystatus === 3" class="line">|</span> - <span v-if="mystatus === 3" @click="handleDelete(scope.row)">鍒犻櫎</span> + <span v-if="mystatus === 3" class="line">|</span> + <span v-if="mystatus === 3" @click="handleDelete(scope.row)" + >鍒犻櫎</span + > </div> </template> </el-table-column> @@ -106,7 +120,7 @@ </el-dialog> <div class="tools"> <div class="funs"> - <div class="funsItem funs-sp"> + <div class="funsItem funs-sp funs-first"> <el-checkbox v-model="all" @change="selectAll()" >鍏ㄩ��</el-checkbox > @@ -117,10 +131,7 @@ > </div> <div class="funsItem"> - <el-select - v-model="myIdx" - placeholder="鎵归噺鎿嶄綔" - > + <el-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔"> <el-option v-for="item in options" :key="item.value" @@ -216,13 +227,13 @@ tempList: [], typeList: [ { - name: "鎽勫儚澶存帹閫�", - value: "01", + name: "鏈湴鎺ㄩ��", + value: "05", checked: true, }, { - name: "鍗曞叺鎺ㄩ��", - value: "03", + name: "100璺帹閫�", + value: "04", checked: false, }, ], @@ -248,34 +259,34 @@ // 鎵归噺鍒犻櫎 mulDelete(idArr) { 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); - }); + .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) { - this.preMyIdx = list; - this.mulDelete(this.tempList); + this.preMyIdx = list; + this.mulDelete(this.tempList); } else { this.myIdx = this.preMyIdx; this.$message({ @@ -336,10 +347,10 @@ }, // 鏇存敼杩濊/杩濆缓 changeTypeChecked(data) { - this.typeList.forEach(item => { + this.typeList.forEach((item) => { item.checked = data.name === item.name; - }) - const checkedType = this.typeList.find(item => item.checked); + }); + const checkedType = this.typeList.find((item) => item.checked); this.mystatus = +checkedType.value; this.size = checkedType.value; this.getImageResourceList(); @@ -375,12 +386,12 @@ getEventSource(value) { return EVENT_SOURCE.find((item) => item.value === value); }, - selectable(row,index){ - if(this.mystatus == '1'){ - return false;//绂佺敤鐘舵�� - }else{ - return true;//闈炵鐢ㄧ姸鎬� - } + selectable(row, index) { + if (this.mystatus == "1") { + return false; //绂佺敤鐘舵�� + } else { + return true; //闈炵鐢ㄧ姸鎬� + } }, }, }; @@ -388,14 +399,14 @@ <style lang="scss" scoped> .userList { text-align: left; - margin: 10px 20px; - color: #4b9bb7; - + padding: 10px 20px; + // color: #4b9bb7; + border: 1px solid #ccc; header { background-color: white; .headerContent { - padding: 0 40px; + padding: 0; display: flex; line-height: 100px; justify-content: space-between; @@ -415,7 +426,7 @@ &::v-deep .el-input__inner { // background-color: #09152f; - border: 1px solid #17324c; + //border: 1px solid #17324c; } } } @@ -429,14 +440,14 @@ .el-button { padding: 12px 25px; - border-radius: 20px; + //border-radius: 20px; } } .addBtn { // background-color: #eb5d01; border: none; - border-radius: 20px; + //border-radius: 20px; padding: 12px 30px; } } @@ -444,14 +455,16 @@ &::v-deep .el-input__inner { // background-color: #09152f; - border: 1px solid #17324c; + //border: 1px solid #17324c; } main { // background-color: #09152f; margin-top: 20px; padding-bottom: 50px; - + &::v-deep .el-dialog__body{ + overflow: auto; + } .btn span:hover { cursor: pointer; } @@ -459,7 +472,7 @@ .type-nav { display: flex; line-height: 40px; - margin-left: 30px; + //margin-left: 30px; padding-top: 10px; margin-bottom: 10px; @@ -476,8 +489,8 @@ .is-active { // background-color: #070f22; border-radius: 4px; - color: #333; - font-size: 500; + color: red; + font-weight: 700; } } @@ -485,10 +498,12 @@ display: flex; justify-content: space-between; align-items: center; - padding: 0 20px; - + padding: 0; + .funs-first { + margin-left: 0 !important; + } .funs-sp { - border: 1px solid #17324c; + border: 1px solid #dcdfe6; } .funs { @@ -555,7 +570,7 @@ .operation { display: flex; - + color: var(--operation-color); .line { padding: 0 5px; } -- Gitblit v1.8.0