适配微信小程序

dev
LiuJiaNan 2024-10-16 09:25:19 +08:00
parent 11650ce6be
commit 6ea70cf5ae
19 changed files with 167 additions and 130 deletions

View File

@ -22,12 +22,12 @@
<u-cell>
<view slot="title" class="title">已上传证书</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="item in hImgs" :key="item">
<view style="display: flex;flex-wrap: wrap">
<view v-for="item in hImgs" :key="item" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>

View File

@ -102,12 +102,12 @@
<u-cell>
<view slot="title" class="title">证书图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in userCerList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in userCerList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="userCerList" width="80px" height="80px"
@click="previewImage(userCerList, item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</div>

View File

@ -95,7 +95,7 @@
shape="circle"
text="清单位置"
@click="
uni.$u.route({
$u.route({
url: '/pages/branch-self-report/index/map',
params: { CHECKRECORD_ID },
})

View File

@ -90,12 +90,12 @@
<u-cell>
<view slot="title" class="title">隐患图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(hImgs, item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">
@ -292,12 +292,12 @@
<u-cell>
<view slot="title" class="title">整改后图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in rImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in rImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(rImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
@ -351,12 +351,12 @@
<u-cell>
<view slot="title" class="title">方案图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in sImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in sImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(sImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</template>
@ -398,12 +398,12 @@
<u-cell>
<view slot="title" class="title">验收图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item1,index1) in cImgs" :key="index1">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item1,index1) in cImgs" :key="index1" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item1" width="80px" height="80px"
@click="previewImage(cImgs,item1)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>
@ -489,8 +489,13 @@ export default {
});
},
downloadAppendix(DISPOSAL_FILE) {
plus.runtime.openURL(this.$store.state.filePath + DISPOSAL_FILE, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + DISPOSAL_FILE,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
},

View File

@ -80,12 +80,12 @@
<u-cell>
<view slot="title" class="title">隐患图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(hImgs, item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">

View File

@ -95,12 +95,12 @@
<u-cell>
<view slot="title" class="title">隐患照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(hImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">
@ -144,12 +144,12 @@
<u-cell v-if="form.RECTIFICATIONTYPE=='1'">
<view slot="title" class="title">整改后图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in rImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in rImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(rImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
@ -326,8 +326,13 @@ export default {
});
},
downloadAppendix(DISPOSAL_FILE) {
plus.runtime.openURL(this.$store.state.filePath + DISPOSAL_FILE, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + DISPOSAL_FILE,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
},

View File

@ -6,12 +6,12 @@
<u-cell>
<view slot="title" class="title">隐患照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hiddenData.hiddenImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hiddenData.hiddenImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.url"
width="80px" height="80px" @click="previewImage(hiddenData.hiddenImgs,item.url)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</template>
@ -87,12 +87,12 @@
<u-cell>
<view slot="title" class="title">整改照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hiddenData.zgImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hiddenData.zgImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.url"
width="80px" height="80px" @click="previewImage(hiddenData.zgImgs,item.url)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<view class="card" v-show="type === 'acceptance'||hiddenData.STATE==='4'">

View File

@ -6,12 +6,12 @@
<u-cell>
<view slot="title" class="title">隐患照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hiddenData.hiddenImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hiddenData.hiddenImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.url"
width="80px" height="80px" @click="previewImage(hiddenData.hiddenImgs,item.url)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</template>
@ -87,12 +87,12 @@
<u-cell v-show="hiddenData.STATE==='2'||hiddenData.STATE==='4'">
<view slot="title" class="title">整改照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hiddenData.zgImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hiddenData.zgImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item.url"
width="80px" height="80px" @click="previewImage(hiddenData.zgImgs,item.url)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<view class="card" v-show="hiddenData.STATE==='4'">

View File

@ -95,7 +95,7 @@
<u-cell>
<view slot="title" class="title required">检查人员</view>
<view slot="label" class="mt-10">
<view>{{ form.INSPECTION_USERS }}</view>
<!-- <view>{{ form.INSPECTION_USERS }}</view>-->
<u--textarea v-model="form.INSPECTION_USERS" placeholder="请输入检查人员"
:disabled="disabled"></u--textarea>
</view>
@ -151,7 +151,7 @@
</u-cell>
</u-cell-group>
</view>
<u-popup :show="popupShow" @close="popupShow = false" mode="right" :closeOnClickOverlay="false"
<u-popup :key="popupShow" :show="popupShow" @close="popupShow = false" mode="right" :closeOnClickOverlay="false"
:customStyle="{width:'85vw',overflowY:'auto'}">
<view class="card">
<u-cell-group :border="false">

View File

@ -83,11 +83,11 @@
<u-cell>
<view slot="title" class="title">隐患照片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px" @click="previewImage(hImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">
@ -330,8 +330,13 @@ export default {
});
},
downloadAppendix(DISPOSAL_FILE) {
plus.runtime.openURL(this.$store.state.filePath + DISPOSAL_FILE, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + DISPOSAL_FILE,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
},

View File

@ -81,12 +81,12 @@
<u-cell>
<view slot="title" class="title">隐患图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(hImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">
@ -305,8 +305,13 @@ export default {
});
},
downloadAppendix(DISPOSAL_FILE) {
plus.runtime.openURL(this.$store.state.filePath + DISPOSAL_FILE, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + DISPOSAL_FILE,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
},

View File

@ -42,7 +42,9 @@ export default {
eventChannel.emit('acceptDataFromOpenedPage', {
data: event.detail.data[0]
});
// #ifdef APP-PLUS
uni.navigateBack();
// #endif
},
}
}

View File

@ -84,9 +84,13 @@ export default {
});
},
downloadAppendix(url) {
console.log(url)
plus.runtime.openURL(this.$store.state.filePath + url, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + url,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
}

View File

@ -244,7 +244,7 @@
</u-cell>
</u-cell-group>
</view>
<u-popup :show="popupShow" @close="popupShow = false" mode="right" :closeOnClickOverlay="false"
<u-popup :key="popupShow" :show="popupShow" @close="popupShow = false" mode="right" :closeOnClickOverlay="false"
:customStyle="{width:'85vw',overflowY:'auto'}">
<view class="card">
<u-cell-group :border="false">
@ -345,9 +345,11 @@
<u-cell>
<view slot="title" class="title flex-between">
隐患上报位置
<view>
<u-button type="primary" text="定位" size="mini" @click="showMapModal"
v-if="!popupDisabled"></u-button>
</view>
</view>
<view slot="label" class="mt-10" v-if="hiddenForm.LONGITUDE && hiddenForm.LATITUDE">
<view>经度:{{ hiddenForm.LONGITUDE }}</view>
<view>纬度:{{ hiddenForm.LATITUDE }}</view>

View File

@ -132,8 +132,13 @@ export default {
});
},
downloadAppendix() {
plus.runtime.openURL(this.$store.state.filePath + this.form.INSPECTED_EXPLAIN_FILEPATH, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + this.form.INSPECTED_EXPLAIN_FILEPATH,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
signConfirm({path}) {

View File

@ -89,12 +89,12 @@
<u-cell>
<view slot="title" class="title">隐患图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in hImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in hImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(hImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell v-if="videoUrl">
@ -279,12 +279,12 @@
<u-cell>
<view slot="title" class="title">整改后图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in rImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in rImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(rImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
@ -344,12 +344,12 @@
<u-cell>
<view slot="title" class="title">方案图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in sImgs" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in sImgs" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="item" width="80px" height="80px"
@click="previewImage(sImgs,item)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>
@ -385,12 +385,12 @@
<u-cell>
<view slot="title" class="title">验收图片</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(items,index1) in item.cImgs" :key="index1">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(items,index1) in item.cImgs" :key="index1" class="ml-10 mt-10">
<u--image :showLoading="true" :src="filePath + '/' +items.FILEPATH" width="80px" height="80px"
@click="previewImages(item.cImgs,items)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>
@ -549,9 +549,13 @@ export default {
});
},
downloadAppendix(DISPOSAL_FILE) {
// console.log(this.$store.state.filePath + DISPOSAL_FILE)
plus.runtime.openURL(this.$store.state.filePath + DISPOSAL_FILE, function (res) {
console.log(res);
uni.downloadFile({
url: this.$store.state.filePath + DISPOSAL_FILE,
success: (res) => {
uni.openDocument({
filePath: res.tempFilePath,
});
},
});
},
finalChecktimeConfirm(e) {

View File

@ -97,23 +97,23 @@
<u-cell>
<view slot="title" class="title">上传会签文件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in meetingImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in meetingImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill" @click="previewImage"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in appendixImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in appendixImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill" @click="previewImage"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>
@ -202,25 +202,25 @@
<u-cell>
<view slot="title" class="title">上传会议纪要</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in fileList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in fileList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,fileList)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in fileList1" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in fileList1" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,fileList1)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>

View File

@ -98,25 +98,25 @@
<u-cell>
<view slot="title" class="title">上传会签文件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in meetingImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in meetingImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,meetingImgList)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in appendixImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in appendixImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,appendixImgList)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>

View File

@ -99,25 +99,25 @@
<u-cell>
<view slot="title" class="title">上传会签文件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in meetingImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in meetingImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,meetingImgList)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in appendixImgList" :key="index">
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in appendixImgList" :key="index" class="ml-10 mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,appendixImgList)"></u--image>
</u-col>
</u-row>
</view>
</view>
</view>
</u-cell>
</u-cell-group>