From 86b6ecee0111eeccf11ab5e440b0bac161fa65c4 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 12 九月 2023 19:48:08 +0800
Subject: [PATCH] 家庭模块的打印
---
ruoyi-ui/src/views/contacts/index.vue | 73 +++++++++++++++++++++++-------------
1 files changed, 47 insertions(+), 26 deletions(-)
diff --git a/ruoyi-ui/src/views/contacts/index.vue b/ruoyi-ui/src/views/contacts/index.vue
index fb54aaf..175ea01 100644
--- a/ruoyi-ui/src/views/contacts/index.vue
+++ b/ruoyi-ui/src/views/contacts/index.vue
@@ -141,7 +141,7 @@
</div>
<el-table v-loading="loading" :data="contactList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;">
- <el-table-column type="selection" :reserve-selection="true" width="25" align="center" />
+ <el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
<el-table-column label="瀹朵汉濮撳悕" prop="myName" sortable width="130" >
@@ -177,6 +177,10 @@
<span v-if="scope.row.isAlways== null">鈥斺��</span>
</template>
</el-table-column>
+ <el-table-column label="鏄惁鏄湰瀹跺涵璁板綍" prop="ownData" sortable width="150px" >
+ <template slot-scope="scope">{{scope.row.ownData === 0 ? '鍚�': '鏄�'}}</template>
+ </el-table-column>
+
<el-table-column label="澶囨敞锛堟槸鍚﹀瓨鍦ㄩ噾閽卞叧绯伙級" prop="remark" sortable width="120" align="center">
<template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
@@ -185,22 +189,23 @@
<el-table-column label="鐢靛瓙鍚嶇墖" prop="url" width="160" align="center">
<template slot-scope="scope" >
<div @click="handleCheck(scope.row)">
- <img
- class="el-upload-list__item-thumbnail"
- src="../../assets/images/deviceLis.png"
- alt=""
- style="width: 35px; height: 35px;"
- fit="cover"
- v-if="scope.row.url !== ','"
- >
- <img
- class="el-upload-list__item-thumbnail"
- src="../../assets/images/deviceA.png"
- alt=""
- style="width: 35px; height: 35px;"
- fit="cover"
- v-if="scope.row.url === ','"
- ></div>
+ <img
+ class="el-upload-list__item-thumbnail"
+ src="../../assets/images/deviceLis.png"
+ alt=""
+ style="width: 35px; height: 35px;"
+ fit="cover"
+ v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)"
+ >
+ <img
+ v-else
+ class="el-upload-list__item-thumbnail"
+ src="../../assets/images/deviceA.png"
+ alt=""
+ style="width: 35px; height: 35px;"
+ fit="cover"
+
+ ></div>
</template>
</el-table-column>
@@ -278,8 +283,10 @@
</el-input>
</el-form-item>
<el-form-item label="鏄惁甯歌仈绯�" prop="isAlways">
- <el-input v-model="formDat.isAlways" placeholder="鏄惁甯歌仈绯�" clearable :style="{width: '100%'}" >
- </el-input>
+ <el-select v-model="formDat.isAlways" placeholder="璇烽�夋嫨鏄惁甯歌仈绯�" clearable :style="{width: '100%'}" >
+ <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
+ ></el-option>
+ </el-select>
</el-form-item>
<el-form-item label="澶囨敞锛堟槸鍚﹀瓨鍦ㄩ噾閽卞叧绯伙級" prop="remark">
@@ -294,7 +301,7 @@
:http-request="requestUpload"
:file-list="fileList"
>
- <i slot="default" class="el-icon-plus"></i>
+ <i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
class="el-upload-list__item-thumbnail"
@@ -336,6 +343,7 @@
:show-file-list="true"
>
<el-button type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>
<template #tip>
<div class="el-upload__tip">
</div>
@@ -410,7 +418,7 @@
dsb:true,
btn:false,
fit:['fill'],
-
+ uploading: false,
formDat: {
//閫氳褰�
id:undefined,
@@ -522,7 +530,14 @@
trigger: 'blur'
}],
},
- typeOptions: [],
+ typeOptions: [{
+ value: '1',
+ label: '鏄�',
+ },
+ {
+ value: '0',
+ label: '鍚�',
+ }],
};
},
created() {
@@ -705,8 +720,13 @@
Object.keys(this.formDat).forEach(key => {
this.formDat[key] = '';
});
- this.handleRemove(this.fileList[0]);
- this.handleRemoveFile(this.fileListOther[0]);
+ for(let i = 0; i <= this.fileList.length; i++)
+ {
+ this.handleRemove(this.fileList[0]);
+ }
+ for(let i = 0; i < this.fileListOther.length; i++){
+ this.handleRemoveFile(this.fileListOther[0]);
+ }
},
requestUpload(params)
{
@@ -714,10 +734,11 @@
var formData = new FormData();
formData.append('uploadFile', file);
let _this = this
-
+ this.uploading = true;
uploadPic(formData).then(response => {
let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
-
+ this.uploading = false;
+ this.$modal.msgSuccess("涓婁紶鎴愬姛");
if(_this.fot.includes(pth) === true)
{
_this.fileList.push({name:response.data.fileName, "url":response.data.url})
--
Gitblit v1.9.1