123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- <!-- 随手拍-详情 -->
- <template>
- <view class="examine">
- <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
- <view class="basics">
- <view class="grade">
- <text>学院:</text>
- <text>环测学院</text>
- </view>
- <view class="grade">
- <text>实验室:</text>
- <text>实验室名称-房间号</text>
- </view>
- <view class="project">
- <view class="project_t">隐患描述:</view>
- <view class="project_b">隐患描述隐患描述隐患描述隐患描述隐患描述描述隐患描述隐患描述隐患描述隐患描述隐患描述隐患描述</view>
- </view>
- <view class="picture">
- <view class="picture_t">隐患照片:</view>
- <view class="picture_b">
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- </view>
- </view>
- <view class="grade">
- <text>上报时间:</text>
- <text>2023-04-0614:00</text>
- </view>
- <view class="grade" style="border:none;">
- <text>上报人:</text>
- <text >李腾</text>
- </view>
- </view>
- <!-- 待整改 -->
- <view v-if="pageType==1">
- <view class="await">
- <view class="result">
- <view class="result_l">整改结果</view>
- <view class="result_r">
- <view v-for="(item,index) in resultArray" :key="index" @click="tabClick(index)">
- <text :class="resultIndex==index?'checked':'result_r_l' "></text>
- <text class="result_r_r">{{item}}</text>
- </view>
- </view>
- </view>
- <view class="describe">
- <view class="describe_l">原因描述:</view>
- <textarea class="describe_r" type="text" v-model="form.yhMs" maxlength="50" placeholder="请输入原因描述" placeholder-style="font-size:28rpx;color:#999;"></textarea>
- </view>
- <view class="check-for-img-max-box">
- <view class="left-title-p">隐患照片(最多上传5张):</view>
- <view class="right-img-box">
- <view class="img-box" v-for="(imgUrl,imgIndex) in form.yhImg" :key="imgIndex">
- <img class="img-data" :src="configURL+imgUrl">
- <img class="position-img" src="@/pages_manage/images/icon_ssp_closure.png" @click="delImg(imgIndex)">
- </view>
- <img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage()" v-if="form.yhImg.length<5">
- </view>
- </view>
- </view>
- </view>
- <!-- 隐患整改 -->
- <view class="basics" v-if="pageType==2">
- <view class="small_title">隐患整改</view>
- <view class="grade">
- <text>整改结果:</text>
- <text style="color: #0183FA;">已整改</text>
- </view>
- <view class="project">
- <view class="project_t">整改措施:</view>
- <view class="project_b">隐患描述隐患描述隐患描述隐患描述隐患描述描述隐患描述隐患描述隐患描述隐患描述隐患描述隐患描述</view>
- </view>
- <view class="picture">
- <view class="picture_t">上传照片:</view>
- <view class="picture_b">
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
- </view>
- </view>
- <view class="grade">
- <text>整改时间:</text>
- <text>2023-04-0614:00</text>
- </view>
- <view class="grade" style="border:none;">
- <text>整改人:</text>
- <text >李腾</text>
- </view>
- </view>
- </scroll-view>
- <view v-if="pageType==1" class="bottom_btn" @click="handleClick('subBtn')">提交</view>
- </view>
- </template>
- <script>
- import { config } from '@/api/request/config.js'
- import { getSelectInfoByRoom} from '@/api/index.js'
- export default {
- name: "rectifyList",
- components: {
-
- },
- data() {
- return {
- configURL:config.base_url,
- pageType:2,
- form:{
- yhMs:'',
- yhImg:[],
- opinion:'',
- },
- resultIndex:0,
- resultArray:['已整改','暂无法整改'],
- }
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- mounted(){
-
- },
- methods: {
- //整改结果
- tabClick(index) {
- this.resultIndex = index;
- },
- //滚动事件
- scrollGet(){},
- handleClick(doType){
- let self=this;
- if(doType=='subBtn'){//提交
-
- }
-
- },
-
- // 图片上传
- selectImage() {
- let self = this;
- if(this.form.yhImg.length>4){
- uni.showToast({
- title: '最多上传5张图片',
- icon:"none",
- mask:true,
- duration: 2000
- });
- return
- }
- wx.chooseImage({
- count: 1,
- sizeType: ["original", "compressed"],
- sourceType: ["album", "camera"],
- success: function(res) {
- let tempFilePaths = res.tempFilePaths[0];
- self.uploadImg(tempFilePaths);
- }
- });
- },
- async uploadImg(tempFilePaths){
- var self = this;
- uni.showLoading({
- title: '上传中',
- mask: true
- });
- uni.uploadFile({
- url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
- header:{'Authorization':uni.getStorageSync('token')},
- filePath: tempFilePaths,
- name: 'file',
- formData: {
- 'user': 'test'
- },
- success: (uploadFileRes) => {
- let res = JSON.parse(uploadFileRes.data);
- if(res.code == 200){
- this.form.yhImg.push(res.data.url);
- console.log(res.data.url)
- }else{
- uni.showToast({
- title: res.msg,
- icon:"none",
- mask:true,
- duration: 2000
- });
- }
- },
- fail: err => {},
- complete: () => {
- uni.hideLoading()
- }
- });
- },
- //删除图片
- delImg(minIndex){
- this.form.yhImg.splice(minIndex,1);
- this.$forceUpdate();
- },
-
- }
- }
- </script>
- <style lang="stylus" scoped>
- .examine{
- height:100%;
- display flex;
- box-sizing: border-box;
- .info-max-box{
- flex: 1;
- overflow: scroll;
- padding-bottom: 128rpx;
- box-sizing: border-box;
- }
- .basics{
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx ;
- .small_title{
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- border-bottom: 1rpx solid #D8D8D8;
- }
- .grade{
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #D8D8D8;
- >text:nth-of-type(1){
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- }
- >text:nth-of-type(2){
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- text-align: right;
- }
- }
- .project{
- .project_t{
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .project_b{
- min-height: 158rpx;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 40rpx;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- background: #F5F5F5;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- }
- .project_b2{
- font-size: 26rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 26rpx;
- margin-top: 14rpx;
- text-align: right;
- }
- }
- .picture{
- .picture_t{
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .picture_b{
- display: flex;
- justify-content: flex-start;
- flex-wrap: wrap;
- >img{
- width: 200rpx;
- height: 200rpx;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin-right: 14rpx;
- margin-bottom: 10rpx;
- }
- >img:nth-of-type(3n+3){
- margin-right: 0rpx;
- }
- }
- }
- }
- /* 待整改 */
- .await{
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx ;
- /* 整改结果 */
- .result{
- display: flex;
- justify-content: flex-start;
- border-bottom: 1rpx solid #D8D8D8;
- .result_l{
- width: 146rpx;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .result_r{
- width: 486rpx;
- height: 80rpx;
- padding-left: 20rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- >view{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-right: 24rpx;
- .result_r_l{
- display: inline-block;
- width: 30rpx;
- height: 30rpx;
- border-radius: 50%;
- border: 1rpx solid #E0E0E0;
- margin-right: 14rpx;
- }
- .result_r_r{
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .checked{
- display: inline-block;
- width: 30rpx;
- height: 30rpx;
- border-radius: 50%;
- border: 1rpx solid #0183FA;
- margin-right: 14rpx;
- position: relative;
- }
- .checked::after{
- content: '';
- position: absolute;
- top: 5rpx;
- left:5rpx;
- width: 20rpx;
- height: 20rpx;
- border-radius: 50%;
- background: #0183FA;
- }
- }
- }
- }
- /* 原因描述 */
- .describe{
- .describe_l{
- width: 158rpx;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .describe_r{
- width: 630rpx;
- height: 158rpx;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- opacity: 1;
- border: 1rpx solid #E0E0E0;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 34rpx;
- }
- }
- /* 上传照片 */
- .check-for-img-max-box{
- .left-title-p{
- width: 100%;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .right-img-box{
- .img-box{
- display inline-block;
- height:200rpx;
- width:200rpx;
- position relative
- margin:0 14rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- .img-data{
- height:200rpx;
- width:200rpx;
- }
- .position-img{
- position absolute
- right:0;
- top:0;
- width:36rpx;
- height:36rpx;
- }
- }
- .img-box:nth-of-type(3n+3){
- margin-right: 0rpx;
- }
- .add-button{
- margin:0 0rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- display inline-block
- height:200rpx;
- width:200rpx;
- }
- }
- }
- }
- .bottom_btn{
- position: fixed;
- bottom: 26rpx;
- left: 30rpx;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 90rpx;
- width: 690rpx;
- height: 90rpx;
- background: #0183FA;
- border-radius: 20rpx;
- text-align: center;
-
- }
- }
- </style>
|