From 3b0c6608b3787504820593e89f2d052521dc6700 Mon Sep 17 00:00:00 2001
From: lichao <326994889@qq.com>
Date: Fri, 15 Nov 2024 15:31:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/shequzhili/materialcode/add.vue | 5 +-
.../materialcode/icmaterialcode.vue | 177 +++++-
.../shequzhili/videomonitoring/add.vue | 554 ++++++++++++++++++
.../shequzhili/videomonitoring/event.vue | 211 +++++++
.../shequzhili/videomonitoring/index.vue | 479 +++++++++++++++
5 files changed, 1417 insertions(+), 9 deletions(-)
create mode 100644 src/views/modules/shequzhili/videomonitoring/add.vue
create mode 100644 src/views/modules/shequzhili/videomonitoring/event.vue
create mode 100644 src/views/modules/shequzhili/videomonitoring/index.vue
diff --git a/src/views/modules/shequzhili/materialcode/add.vue b/src/views/modules/shequzhili/materialcode/add.vue
index 2cbcb9ee0..5a0869674 100644
--- a/src/views/modules/shequzhili/materialcode/add.vue
+++ b/src/views/modules/shequzhili/materialcode/add.vue
@@ -126,7 +126,10 @@ export default {
this.startLoading();
if(row!=null){
this.formData = JSON.parse(JSON.stringify(row));
- this.fileList.push({fileUrl:this.formData.picture})
+ if (this.formData.picture){
+ this.fileList.push({fileUrl:this.formData.picture})
+ }
+
console.log(this.formData.picture,'see');
}
diff --git a/src/views/modules/shequzhili/materialcode/icmaterialcode.vue b/src/views/modules/shequzhili/materialcode/icmaterialcode.vue
index b738164ea..6de32d938 100644
--- a/src/views/modules/shequzhili/materialcode/icmaterialcode.vue
+++ b/src/views/modules/shequzhili/materialcode/icmaterialcode.vue
@@ -5,7 +5,7 @@
-
+
@@ -28,8 +28,19 @@
-
-
新增
+
+ 入库
+ 下载模板
+
+
+
+ 导入
+
+
+
@@ -98,9 +109,11 @@
formTitle: '新增活动',
detailShow: false,
formData: {
- status:'',
- agencyId: '',
- name: ""
+ // status:'',
+ // agencyId: '',
+ name: null,
+ introduce:null,
+ remark:null
},
pageSize: 20,
pageNo: 1
@@ -120,6 +133,146 @@
},
methods: {
+ async exportData(){
+
+ },
+ async downloadTem(){
+ let url =
+ "/actual/base/materialcode/downloadImportTemplate";
+ let params = {};
+ await this.$http({
+ method: "get",
+ url,
+ responseType: "blob",
+ data: params,
+ })
+ .then((res) => {
+ // this.download(res.data, title + '.xls')
+ if (res.headers["content-disposition"]) {
+ let fileName = window.decodeURI(
+ res.headers["content-disposition"].split(";")[1].split("=")[1]
+ );
+ console.log("filename", fileName);
+ let blob = new Blob([res.data], {
+ type: "application/vnd.ms-excel",
+ });
+ var url = window.URL.createObjectURL(blob);
+ var aLink = document.createElement("a");
+ aLink.style.display = "none";
+ aLink.href = url;
+ aLink.setAttribute("download", fileName);
+ document.body.appendChild(aLink);
+ aLink.click();
+ document.body.removeChild(aLink); //下载完成移除元素
+ window.URL.revokeObjectURL(url); //释放掉blob对象
+ } else this.$message.error("下载失败");
+ })
+ .catch((err) => {
+ console.log("err", err);
+ return this.$message.error("网络错误");
+ });
+ },
+ handleProgress(event, file, fileList) {
+ console.log("percentage", file.percentage);
+ },
+ handleExcelSuccess(res, file) {
+ if (!res.code === 0 && !res.msg === 'success') {
+ this.$message.error(res.msg);
+ }
+ },
+ beforeExcelUpload(file) {
+ console.log(file,"file1");
+ debugger
+ const isType = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
+ debugger
+ const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
+ const fileType = isType || isTypeComputer;
+ debugger
+ const isLt1M = file.size / 1024 / 1024 < 10;
+ debugger
+ if (!fileType) {
+ this.$message.error('上传文件只能是xls/xlsx格式!');
+ }
+ debugger
+ if (!isLt1M) {
+ this.$message.error('上传文件大小不能超过 10MB!');
+ }
+ console.log(isLt1M,"isLt1M");
+ debugger
+ return fileType && isLt1M;
+ },
+
+ //模板
+ async uploadHttpRequest(file) {
+ debugger
+
+ // this.importLoading = true;
+ console.log(this.importLoading,"this.importLoading");
+ debugger
+ // this.importBtnTitle = '正在上传中...';
+ this.$message({
+ showClose: true,
+ dangerouslyUseHTMLString: true,
+ message: "导入中,请到系统管理-导入记录中查看进度",
+ duration: 3000
+ });debugger
+ let than = this;
+ console.log(than,"than");
+ debugger
+ // document.getElementById('clickA').addEventListener('click', function () {
+ // than.$router.replace('/main/importRecord-index');
+ // });
+ const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
+ formData.append('file', file.file); //添加文件对象
+ formData.append('code', ''); //添加文件对象
+ debugger
+ console.log(formData,"formData");
+
+ let url = '/actual/base/materialcode/import'
+ // if (this.importType == 2) {
+ // url = '/governance/icEvent/importAwo'
+ // }
+ console.log(url)
+ await this.$http
+ .post(url, formData)
+ .then(res => {
+ log("res", res);
+ if (res.data.code == 0 && res.data.msg == 'success') {
+ const data = res.data.data;
+ this.dataList = [
+ ...Object.keys(data.option.exist).map(k => {
+ return {
+ index: k,
+ srcField: data.option.exist[k],
+ exist: true,
+ field: data.option.exist[k]
+ };
+ }),
+ ...Object.keys(data.option.notExist).map(k => {
+ return {
+ index: k,
+ srcField: data.option.notExist[k],
+ exist: false,
+ field: ''
+ };
+ })
+ ];
+ this.importOption = data.option;
+ this.importCode = data.code;
+ this.fileData = file;
+ } else this.$message.error(res.data.msg);
+ })
+ .catch(err => {
+ console.log('失败', err);
+ file.onError(); //上传失败的文件会从文件列表中删除
+ });
+ this.importLoading = false;
+ this.importBtnTitle = '导入';
+ this.$refs.upload.clearFiles();
+ this.getTableData();
+ },
+
+
handleSearch () {
this.loadTable()
},
@@ -192,7 +345,15 @@
},
async download(row){
- window.open(row.code)
+ if (row.code!=null){
+ window.open(row.code)
+ }else{
+ this.$message({
+ type: "error",
+ message: "无二维码"
+ });
+ }
+
},
async handleDelete (row) {
@@ -210,7 +371,7 @@
});
},
async deleteActivity (row) {
- const url = "/actual/base/communityPublicity/delete"
+ const url = "/actual/base/materialcode/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete"
let idArr=[row.id]
const { data, code, msg } = await requestPost(url, idArr)
diff --git a/src/views/modules/shequzhili/videomonitoring/add.vue b/src/views/modules/shequzhili/videomonitoring/add.vue
new file mode 100644
index 000000000..1d86f94cc
--- /dev/null
+++ b/src/views/modules/shequzhili/videomonitoring/add.vue
@@ -0,0 +1,554 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 确
+ 定
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/shequzhili/videomonitoring/event.vue b/src/views/modules/shequzhili/videomonitoring/event.vue
new file mode 100644
index 000000000..a1523d0bf
--- /dev/null
+++ b/src/views/modules/shequzhili/videomonitoring/event.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+ 组织名称:
+
+ {{ formData.agencyName || "--" }}
+
+
+
+
+
+ 设备名称:
+
+ {{ formData.monitorName || "--" }}
+
+
+
+
+ 设备类型:
+
+ {{ formData.monitorType || "--" }}
+
+
+
+
+ 播放视频链接:
+
+ {{ formData.monitorUrl || "--" }}
+
+
+
+
+
图片:
+
+
+
![]()
+
+
+
+
+
+ 所属公司:
+
+ {{ formData.monitorCompany || "--" }}
+
+
+
+
+ 负责人:
+
+ {{ formData.monitorOwnerName || "--" }}
+
+
+
+
+ 联系电话:
+
+ {{ formData.monitorOwnerMobile || "--" }}
+
+
+
+
+ 安装位置:
+
+ {{ formData.monitorAddress || "--" }}
+
+
+
+
+ 备注:
+
+ {{ formData.reamrk || "--" }}
+
+
+
+
+
+
+
+ 关 闭
+
+
+
+
+
+
diff --git a/src/views/modules/shequzhili/videomonitoring/index.vue b/src/views/modules/shequzhili/videomonitoring/index.vue
new file mode 100644
index 000000000..cd6184112
--- /dev/null
+++ b/src/views/modules/shequzhili/videomonitoring/index.vue
@@ -0,0 +1,479 @@
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+