-
+ 新建图片库
+
+
+
@@ -88,6 +92,7 @@ data() {
},
],
+ name:"",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
taskId:"",
@@ -101,6 +106,10 @@ mounted() {
this.getTableData()
},
methods: {
+ onSelect(){
+ console.log(this.name,"dsflkjslkdf");
+
+ },
closePictureList(){
console.log("dslkfjklsd");
diff --git a/src/views/modules/base/smartExcel/cpts/share-excel.vue b/src/views/modules/base/smartExcel/cpts/share-excel.vue
index ff729377c..42544fedb 100644
--- a/src/views/modules/base/smartExcel/cpts/share-excel.vue
+++ b/src/views/modules/base/smartExcel/cpts/share-excel.vue
@@ -5,15 +5,10 @@
返回
- 上传统计模板
-
- 数据列表导出
- 取消
提交
+ @click="handleClickCurrencyEvent('submit')">下载
@@ -214,7 +209,7 @@
console.log('setsheet', e);
},
handelClickBack() {
- this.$emit('close')
+ this.$emit('handleShowPage')
},
},
diff --git a/src/views/modules/base/smartExcel/sharedSpace.vue b/src/views/modules/base/smartExcel/sharedSpace.vue
index 9e17886d2..94420d166 100644
--- a/src/views/modules/base/smartExcel/sharedSpace.vue
+++ b/src/views/modules/base/smartExcel/sharedSpace.vue
@@ -50,6 +50,7 @@
查看
+
-
+
@@ -83,13 +84,13 @@
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
- import excelInfo from "./cpts/excel-info";
+ import shareExcel from "./cpts/share-excel";
import excelAdd from "./cpts/excel-add";
import exportShared from "./cpts/export-shared.vue"
import dataSharing from "./cpts/data-sharing.vue"
import pictureCollection from "./cpts/picture-collection.vue"
export default {
- components: { excelInfo, excelAdd,exportShared,dataSharing,pictureCollection},
+ components: { exportShared,dataSharing,pictureCollection,shareExcel},
data() {
let endDisabledDate = (time) => {
From dff4b103cdb9d70481eab4bbe5f88cf054570956 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Tue, 25 Feb 2025 17:57:18 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E5=85=B1=E4=BA=AB=E5=9B=BE=E7=89=87?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../base/smartExcel/cpts/picture-add.vue | 130 +++++-------------
.../smartExcel/cpts/picture-collection.vue | 105 +++++++-------
2 files changed, 94 insertions(+), 141 deletions(-)
diff --git a/src/views/modules/base/smartExcel/cpts/picture-add.vue b/src/views/modules/base/smartExcel/cpts/picture-add.vue
index f5c90928f..b35b2b481 100644
--- a/src/views/modules/base/smartExcel/cpts/picture-add.vue
+++ b/src/views/modules/base/smartExcel/cpts/picture-add.vue
@@ -11,7 +11,7 @@
-
+
@@ -33,7 +33,7 @@
取 消
- 确 定
@@ -80,8 +80,10 @@
label:"本级和直接上下级组织共享"
},
],
+ formType:"add",
formData:
- {
+ {
+
coverPicture:"",
albumName:"",
sharedScope:""
@@ -97,27 +99,15 @@
components: {Tinymce, UploadImage },
mounted() {
- this.activityType()
this.listServerOrg()
},
methods: {
- async activityType() {
- this.$nextTick(() => {
- if (!map) {
- this.initMap(this.formData.latitude, this.formData.longitude);
- console.log("map", map,this.formData.latitude, this.formData.longitude)
- } else {
- map.setCenter(this.formData.latitude, this.formData.longitude);
- map.setMarker(this.formData.latitude, this.formData.longitude);
- console.log("mapmapmap", map)
- }
- })
- },
removedImg() {
- this.formData.coverPic = ''
+ this.formData.coverPicture = ''
},
onChangeFileList(e) {
+ this.startLoading()
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
@@ -128,21 +118,21 @@
} else {
this.formData.coverPicture = '';
}
+ this.endLoading()
},
async initForm(type, activityId) {
this.startLoading()
this.formType = type
console.log(type,activityId,"进行修改");
-
if (type === 'edit') {
this.formData = activityId
- if (activityId.coverPic) {
+ if (activityId.coverPicture) {
let ob = {
fileType: '0',
- fileUrl: activityId.coverPic
+ fileUrl: activityId.coverPicture
};
this.fileList = [ob];
- this.formData.coverPic = ob.fileUrl;
+ this.formData.coverPicture = ob.fileUrl;
}
} else {
@@ -150,74 +140,20 @@
this.endLoading()
},
-
- async getDemandOptions() {
- this.$http
- .post("/actual/base/serviceitem/listAllCategory",{})
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- } else {
- console.log(res.data);
- this.demandOptions = this.getFlagData(
- this.getTreeData(res.data),
- "usableFlag"
- );
- }
- })
- .catch(() => {
- return this.$message.error("网络错误");
- });
- },
- getFlagData(data, flag) {
- if (!Array.isArray(data)) return [];
- let arr1 = data.filter((item) => item[flag]);
- let arr2 = arr1.map((item) => {
- if (item.childCateList)
- return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
- else return item;
- });
- return arr2;
- },
- getTreeData(data) {
- if (!Array.isArray(data)) return [];
- let arr = data.map((item) => {
- let _item = {};
- if (item.childCateList) {
- if (item.childCateList.length === 0)
- _item = { ...item, childCateList: undefined };
- else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
- } else {
- _item = { ...item };
- }
- return _item;
- });
- return arr;
- },
- async loadGrid() {
- const url = "/gov/org/customergrid/gridoption"
-
- let params = {
- agencyId: this.agencyId
+ async handleComfirm() {
+ if(!this.formData.albumName){
+ return this.$message.error("请输入图片集名称")
}
-
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.gridList = data
-
- } else {
- this.$message.error(msg)
+ if(!this.formData.coverPicture){
+ return this.$message.error("请上传封面图片")
+ }
+ if(!this.formData.sharedScope){
+ return this.$message.error("请选择共享范围")
}
-
- },
-
-
-
- async handleComfirm() {
this.addActivity()
},
async addActivity() {
+ if(this.formType=="add"){
let url = '/actual/base/albums/save'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
@@ -228,16 +164,26 @@
} else {
this.$message.error(msg)
}
- console.log("sdlkfjklsdf ");
this.$emit('closeAdd')
+ }else{
+ let url = '/actual/base/albums/update'
+ const { data, code, msg } = await requestPost(url, this.formData)
+ if (code === 0) {
+ this.$message({
+ type: 'success',
+ message: '操作成功'
+ })
+ } else {
+ this.$message.error(msg)
+ }
+ this.$emit('closeAdd')
+ }
+
},
-
-
-
handleCancle() {
console.log("sdlkfjklsdf ");
this.$emit('closeAdd')
-
+
},
@@ -260,13 +206,13 @@
computed: {
dataRule() {
return {
- columnId: [
+ albumName: [
{ required: true, message: '请输入图片集名称', trigger: 'blur' }
],
- title: [
+ sharedScope: [
{ required: true, message: '请选择共享范围', trigger: 'blur' }
],
- fileList: [
+ coverPicture: [
{ required: true, message: '请选择图片集封面', trigger: 'blur' }
]
}
diff --git a/src/views/modules/base/smartExcel/cpts/picture-collection.vue b/src/views/modules/base/smartExcel/cpts/picture-collection.vue
index 2777eb1e5..e2ce04fb9 100644
--- a/src/views/modules/base/smartExcel/cpts/picture-collection.vue
+++ b/src/views/modules/base/smartExcel/cpts/picture-collection.vue
@@ -13,24 +13,24 @@
-
+
. . .
- 修改
- 删除
+ 修改
+ 删除
![]()
-
-
{{ item.title }}
+
{{ item.albumName }}
@@ -57,40 +57,6 @@ data() {
showPictureList:false,
formShow:false,
pictureList:[
- {
- id:"1001",
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250224/8b8a174ea85e48e684267ce1a3f10dd1.jpg",
- title:"嘉定山社区网格巡查"
- },
- {
- src:"",
- title:"嘉定山社区网格巡查"
- },
-
],
name:"",
pageNo: 1,
@@ -106,13 +72,22 @@ mounted() {
this.getTableData()
},
methods: {
+ async getTableData() {
+ const url = "/actual/base/albums/page";
+ const { data, code, msg } = await requestGet(url, {
+ name:this.name,
+
+ });
+ if (code === 0) {
+ this.pictureList=data.list
+ } else {
+ this.$message.error(msg);
+ }
+ },
onSelect(){
- console.log(this.name,"dsflkjslkdf");
-
+ this.getTableData()
},
closePictureList(){
- console.log("dslkfjklsd");
-
this.showPictureList=false
},
onPictureList(){
@@ -120,8 +95,8 @@ methods: {
},
closeAdd(){
console.log("dsfjklsdfjl");
-
this.formShow=false
+ this.getTableData()
},
onClick(type,id){
console.log(type,"这是点击");
@@ -130,12 +105,44 @@ methods: {
this.$refs.ref_form.initForm(type,id);
});
},
- onClickEdit(item){
- this.formShow=true
- this.$nextTick(() => {
- this.$refs.ref_form.initForm("edit",item);
- });
+ onClickEdit(item,val){
+ console.log(item,val,"ds.lm;sd");
+ if (val === 'del') {
+ this.$confirm("确认删除?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ this.handleDelete(item)
+ })
+ .catch(err => {
+ if (err == "cancel") {
+ }
+ });
+ } else {
+ this.formShow = true
+ this.$nextTick(() => {
+ this.$refs.ref_form.initForm("edit", item);
+ });
+ }
+
},
+ async handleDelete(row) {
+ const url = "/actual/base/albums/delete"
+ let ids = [row.id]
+ const { data, code, msg } = await requestPost(url, ids)
+ if (code === 0) {
+ this.$message({
+ type: "success",
+ message: "删除成功"
+ });
+ this.getTableData()
+ this.loadTable()
+ } else {
+ this.$message.error(msg)
+ }
+ },
},
components:{pictureAdd,pictureList},