|
|
@@ -1,319 +1,297 @@
|
|
|
<template>
|
|
|
- <!-- 查看技师详情 -->
|
|
|
- <div class="details">
|
|
|
- <div class="title">基本信息</div>
|
|
|
- <el-form :model="uploadInfos" label-position="left">
|
|
|
- <el-form-item label="姓名:">
|
|
|
- <el-input v-model="jsInfos.cName"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="性别:">
|
|
|
- <el-radio-group v-model="jsInfos.nSex">
|
|
|
- <el-radio :label="0">女</el-radio>
|
|
|
- <el-radio :label="1">男</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="电话:">
|
|
|
- <el-input v-model="jsInfos.cPhone"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="城市:">
|
|
|
- <el-select
|
|
|
- value-key="deptId"
|
|
|
- v-model="jsInfos.city"
|
|
|
- placeholder="请选择"
|
|
|
- @change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.deptId"
|
|
|
- :label="item.deptName"
|
|
|
- :value="item"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="生活照:">
|
|
|
- <!-- <el-input v-model="jsInfos.cName"></el-input> -->
|
|
|
- <!-- <div class="image" v-for="(item,index) in jsInfos.cImgList" :key="index">
|
|
|
- <img :src="item" alt="">
|
|
|
- </div> -->
|
|
|
- <div class="allbox">
|
|
|
- <div class="imgslist">
|
|
|
- <div
|
|
|
- class="imgs"
|
|
|
- v-for="(item, index) in jsInfos.cImgList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <img :src="item" alt="" />
|
|
|
- <div class="ifnone" @click="removeLifeImgs(index)">删除</div>
|
|
|
- </div>
|
|
|
- <el-upload
|
|
|
- class="images_box"
|
|
|
- action="#"
|
|
|
- :http-request="handleLifeSuccess"
|
|
|
- :before-upload="beforeLifeImagesUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="jsInfos" ref="form" label-width="120px">
|
|
|
+
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="section-title">基本信息</span>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="视频:">
|
|
|
- <el-upload
|
|
|
- class="video-uploader"
|
|
|
- action="#"
|
|
|
- :http-request="handleVideoUpload"
|
|
|
- :before-upload="beforeVideoUpload"
|
|
|
- :show-file-list="false"
|
|
|
- accept="video/*"
|
|
|
- >
|
|
|
- <template v-if="!jsInfos.cVideo">
|
|
|
- <i class="el-icon-plus video-uploader-icon"></i>
|
|
|
- <div class="el-upload__text">点击上传视频,或拖拽视频到此处</div>
|
|
|
- <div class="el-upload__tip">支持MP4、AVI等格式,大小不超过100MB</div>
|
|
|
- </template>
|
|
|
- <video v-else :src="jsInfos.cVideo" controls class="video-preview" style="width: 300px;height: 200px;"></video>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <div class="title">详细信息</div>
|
|
|
- <el-form-item label="昵称:">
|
|
|
- <el-input v-model="jsInfos.cNickName"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="头像:">
|
|
|
- <el-upload
|
|
|
- action="#"
|
|
|
- class="avatar-uploader"
|
|
|
- :http-request="handleAvatarSuccess"
|
|
|
- :before-upload="beforeAvatarUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="jsInfos.cPortrait"
|
|
|
- :src="jsInfos.cPortrait"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="身份证照片:">
|
|
|
- <div class="allbox">
|
|
|
- <div class="imgslist">
|
|
|
- <div
|
|
|
- class="sfzimg"
|
|
|
- v-for="(item, index) in jsInfos.cSfzImg"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <img :src="item" alt="" />
|
|
|
- <div class="ifnone" @click="removesfzImgs(index)">删除</div>
|
|
|
- </div>
|
|
|
- <el-upload
|
|
|
- class="images_box"
|
|
|
- action="#"
|
|
|
- :http-request="handlesfzSuccess"
|
|
|
- :before-upload="beforesfzImagesUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="姓名">
|
|
|
+ <el-input v-model="jsInfos.cName" placeholder="请输入姓名"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="昵称">
|
|
|
+ <el-input v-model="jsInfos.cNickName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="电话">
|
|
|
+ <el-input v-model="jsInfos.cPhone" placeholder="请输入电话"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="城市">
|
|
|
+ <el-select
|
|
|
+ v-model="jsInfos.deptId"
|
|
|
+ placeholder="请选择城市"
|
|
|
+ @change="handleSelectionChange"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="性别">
|
|
|
+ <el-radio-group v-model="jsInfos.nSex">
|
|
|
+ <el-radio :label="0">女</el-radio>
|
|
|
+ <el-radio :label="1">男</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="是否推荐">
|
|
|
+ <el-radio-group v-model="jsInfos.nB1">
|
|
|
+ <el-radio :label="0">否</el-radio>
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="地址">
|
|
|
+ <el-input v-model="jsInfos.name" disabled placeholder="请在地图选择"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="定位选择">
|
|
|
+ <Map
|
|
|
+ :dataObj="addr"
|
|
|
+ :newAddress="newAddress"
|
|
|
+ @uploadAddress="uploadAddressData"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="个人简介">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ placeholder="请输入个人简介"
|
|
|
+ v-model="jsInfos.cJianjie"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="头像">
|
|
|
+ <ImageUpload v-model="jsInfos.cPortrait" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="生活照">
|
|
|
+ <ImageUpload v-model="jsInfos.cImgList" :limit="9" tipText="建议上传生活近照,最多9张" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="视频展示">
|
|
|
+ <el-upload
|
|
|
+ class="video-uploader"
|
|
|
+ action="#"
|
|
|
+ accept="video/*"
|
|
|
+ :limit="1"
|
|
|
+ list-type="picture-card"
|
|
|
+ :http-request="handleVideoUpload"
|
|
|
+ :before-upload="beforeVideoUpload"
|
|
|
+ :show-file-list="false"
|
|
|
+ >
|
|
|
+ <video
|
|
|
+ class="video-preview"
|
|
|
+ v-if="jsInfos.cVideo"
|
|
|
+ :src="getVideoUrl(jsInfos.cVideo)"
|
|
|
+ controls
|
|
|
+ ></video>
|
|
|
+ <i v-else class="el-icon-plus"></i>
|
|
|
+ <div class="el-upload__tip" slot="tip">支持MP4、AVI等格式,大小不超过100MB</div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-card class="box-card" style="margin-top: 20px;">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="section-title">资质与详细信息</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="评分">
|
|
|
+ <el-input v-model="jsInfos.nStar" type="number"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="点赞数">
|
|
|
+ <el-input v-model="jsInfos.nZan" type="number"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="佣金比例">
|
|
|
+ <el-input v-model="jsInfos.nBili">
|
|
|
+ <template slot="append">%</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="已服务数量">
|
|
|
+ <el-input v-model="jsInfos.nNum" type="number"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="虑拟订单数" prop="virtualOrderNumber">
|
|
|
+ <el-input type="number" v-model="jsInfos.virtualOrderNumber" placeholder="请输入虑拟订单数" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="服务项目">
|
|
|
+ <el-select
|
|
|
+ v-model="jsProjectList"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ value-key="cId"
|
|
|
+ placeholder="请选择项目"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in projectList"
|
|
|
+ :key="item.cId"
|
|
|
+ :label="item.cTitle"
|
|
|
+ :value="item"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="身份证照片">
|
|
|
+ <ImageUpload v-model="jsInfos.cSfzImg" :limit="2" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="健康证">
|
|
|
+ <ImageUpload v-model="jsInfos.healthCertificate" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="资格证">
|
|
|
+ <ImageUpload v-model="jsInfos.certification" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="营业执照">
|
|
|
+ <ImageUpload v-model="jsInfos.businessLicense" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="无犯罪证明">
|
|
|
+ <ImageUpload v-model="jsInfos.noCrime" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-card class="box-card" style="margin-top: 20px;">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="section-title">承诺相关信息</span>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="健康证照片:">
|
|
|
- <el-upload
|
|
|
- action="#"
|
|
|
- class="avatar-uploader"
|
|
|
- :http-request="handlehealthSuccess"
|
|
|
- :before-upload="beforehealthUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="jsInfos.healthCertificate.length > 51"
|
|
|
- :src="jsInfos.healthCertificate"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="资格证照片:">
|
|
|
- <el-upload
|
|
|
- action="#"
|
|
|
- class="avatar-uploader"
|
|
|
- :http-request="handlecertificationSuccess"
|
|
|
- :before-upload="beforecertificationUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="jsInfos.certification.length > 51"
|
|
|
- :src="jsInfos.certification"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="营业执照:">
|
|
|
- <el-upload
|
|
|
- action="#"
|
|
|
- class="avatar-uploader"
|
|
|
- :http-request="handleBusinessSuccess"
|
|
|
- :before-upload="beforeBusinessUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="jsInfos.businessLicense.length > 51"
|
|
|
- :src="jsInfos.businessLicense"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="无犯罪证明:">
|
|
|
- <el-upload
|
|
|
- action="#"
|
|
|
- class="avatar-uploader"
|
|
|
- :http-request="handleNocrimeSuccess"
|
|
|
- :before-upload="beforeNocrimeUpload"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="jsInfos.noCrime.length > 51"
|
|
|
- :src="jsInfos.noCrime"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="评分:">
|
|
|
- <el-input v-model="jsInfos.nStar"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="点赞数:">
|
|
|
- <el-input v-model="jsInfos.nZan"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="佣金比例:">
|
|
|
- <el-input v-model="jsInfos.nBili"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="已服务数量:">
|
|
|
- <el-input v-model="jsInfos.nNum"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item label="审核状态:">
|
|
|
- <el-input v-model="uploadInfos.cName"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
- <el-form-item label="项目:">
|
|
|
- <el-select
|
|
|
- v-model="jsProjectList"
|
|
|
- multiple
|
|
|
- filterable
|
|
|
- allow-create
|
|
|
- value-key="cId"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in projectList"
|
|
|
- :key="item.cId"
|
|
|
- :label="item.cTitle"
|
|
|
- :value="item"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
|
|
|
- <el-form-item label="个人简介:">
|
|
|
- <!-- <el-input v-model="jsInfos.cJianjie"></el-input> -->
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="2"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="jsInfos.cJianjie"
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="承诺书">
|
|
|
+ <FileUpload
|
|
|
+ :fileSize="10"
|
|
|
+ :fileType="['pdf', 'jpg', 'jpeg', 'png']"
|
|
|
+ v-model="jsInfos.commitment"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="承诺录音">
|
|
|
+ <FileUpload
|
|
|
+ :fileSize="10"
|
|
|
+ :fileType="['mp3', 'wav', 'wma']"
|
|
|
+ v-model="jsInfos.recording"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="承诺录像">
|
|
|
+ <FileUpload
|
|
|
+ :fileSize="50"
|
|
|
+ :fileType="['mp4', 'mov', 'mkv', 'wmv']"
|
|
|
+ v-model="jsInfos.videoRecording"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <div class="footer-actions">
|
|
|
+ <el-button type="info" icon="el-icon-chat-dot-round" @click="addComplaintShow">添加评论</el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ :type="jsInfos.nStatus2 == -1 ? 'success' : 'warning'"
|
|
|
+ @click="work"
|
|
|
>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="地址:">
|
|
|
- <el-input v-model="jsInfos.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否推荐:" prop="nB1">
|
|
|
- <el-radio-group v-model="jsInfos.nB1">
|
|
|
- <el-radio :label="0">否</el-radio>
|
|
|
- <el-radio :label="1">是</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <Map
|
|
|
- :newAddress="newAddress"
|
|
|
- :dataObj="addr"
|
|
|
- @uploadAddress="uploadAddressData"
|
|
|
- />
|
|
|
+ {{ jsInfos.nStatus2 == -1 ? '上 岗' : '下 岗' }}
|
|
|
+ </el-button>
|
|
|
|
|
|
- <!-- <el-form-item label="是否带头像框:" prop="nB1">
|
|
|
- <el-radio-group v-model="jsInfos.nB1">
|
|
|
- <el-radio :label="0">否</el-radio>
|
|
|
- <el-radio :label="1">是</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否是新技师:" prop="nB2">
|
|
|
- <el-radio-group v-model="jsInfos.nB2">
|
|
|
- <el-radio :label="0">否</el-radio>
|
|
|
- <el-radio :label="1">是</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否有热度:" prop="nB3">
|
|
|
- <el-radio-group v-model="jsInfos.nB3">
|
|
|
- <el-radio :label="0">否</el-radio>
|
|
|
- <el-radio :label="1">是</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item> -->
|
|
|
+ <template v-if="jsInfos.nTong == 0">
|
|
|
+ <el-button type="success" icon="el-icon-check" @click="auditJs(jsInfos.id)">审 核</el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-close" @click="returnJs(jsInfos.id)">退 回</el-button>
|
|
|
+ </template>
|
|
|
|
|
|
- <div style="text-align: justify; margin-top: 50px; margin-bottom: 20px">
|
|
|
- <el-button type="primary" @click="addComplaintShow(jsInfos.id, jsInfos)"
|
|
|
- >添加评论</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="work" v-if="jsInfos.nStatus2 == -1"
|
|
|
- >上 岗</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="work" v-else>下 岗</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="auditJs(jsInfos.id)"
|
|
|
- v-if="jsInfos.nTong == 0"
|
|
|
- >审 核</el-button
|
|
|
+ <el-button
|
|
|
+ :type="jsInfos.nTong == 3 ? 'success' : 'danger'"
|
|
|
+ @click="blacklist"
|
|
|
>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="returnJs(jsInfos.id)"
|
|
|
- v-if="jsInfos.nTong == 0"
|
|
|
- >退 回</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="submitForm">修 改</el-button>
|
|
|
- <el-button type="primary" @click="blacklist" v-if="jsInfos.nTong == 3"
|
|
|
- >恢 复</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="blacklist" v-else>拉 黑</el-button>
|
|
|
+ {{ jsInfos.nTong == 3 ? '恢 复' : '拉 黑' }}
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button type="primary" icon="el-icon-edit" @click="submitForm">保存修改</el-button>
|
|
|
+ <el-button @click="$router.go(-1)">返 回</el-button>
|
|
|
</div>
|
|
|
- <div class="dialog-footer"></div>
|
|
|
- <!-- <div class="demo-drawer__footer" style="text-align: center;padding:20px 0;" v-if="auditShow">
|
|
|
- <el-button @click="auditJs(jsInfos.id)">审核</el-button>
|
|
|
- <el-button type="primary" @click="returnJs(jsInfos.id)">退回</el-button>
|
|
|
- </div> -->
|
|
|
+
|
|
|
</el-form>
|
|
|
|
|
|
- <!-- 刷评论弹窗 -->
|
|
|
- <el-dialog title="添加评论" :visible.sync="dialogFormVisible">
|
|
|
- <el-form :model="complainForm">
|
|
|
- <el-form-item label="评分:">
|
|
|
- <el-input
|
|
|
- type="number"
|
|
|
- max="5"
|
|
|
- min="0"
|
|
|
- v-model="complainForm.nStar"
|
|
|
- autocomplete="off"
|
|
|
- oninput="if(value<=0){value=null} if(value>5){value=5} if(value.length > 1){value = value.slice(0, 1)}"
|
|
|
- ></el-input>
|
|
|
+ <el-dialog title="添加评论" :visible.sync="dialogFormVisible" width="500px">
|
|
|
+ <el-form :model="complainForm" label-width="80px">
|
|
|
+ <el-form-item label="评分">
|
|
|
+ <el-rate v-model="complainForm.nStar" style="margin-top: 10px;"></el-rate>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="内容:">
|
|
|
- <el-input v-model="complainForm.cText" autocomplete="off"></el-input>
|
|
|
+ <el-form-item label="内容">
|
|
|
+ <el-input type="textarea" v-model="complainForm.cText" placeholder="请输入评论内容"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="时间:">
|
|
|
+ <el-form-item label="时间">
|
|
|
<el-date-picker
|
|
|
v-model="complainForm.dTime"
|
|
|
type="datetime"
|
|
|
placeholder="选择日期时间"
|
|
|
:picker-options="pickerOptions"
|
|
|
+ style="width: 100%"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -328,10 +306,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- listJs,
|
|
|
getJs,
|
|
|
- delJs,
|
|
|
- addJs,
|
|
|
updateJs,
|
|
|
auditJs,
|
|
|
repulseJs,
|
|
|
@@ -341,52 +316,68 @@ import {
|
|
|
block,
|
|
|
getDept,
|
|
|
} from "@/api/system/js";
|
|
|
-import { upload,uploadvideo } from "@/api/public";
|
|
|
+import { uploadvideo } from "@/api/public";
|
|
|
import Map from "@/components/map/map.vue";
|
|
|
+
|
|
|
export default {
|
|
|
+ name: "JsDetails",
|
|
|
components: {
|
|
|
Map,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 禁用未来日期
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
return time.getTime() > Date.now();
|
|
|
},
|
|
|
},
|
|
|
- options: [],
|
|
|
- value: "",
|
|
|
+ options: [], // 城市/部门列表
|
|
|
dialogFormVisible: false,
|
|
|
- jsInfos: {},
|
|
|
- dz: "",
|
|
|
- uploadInfos: {
|
|
|
+
|
|
|
+ // 主信息对象
|
|
|
+ jsInfos: {
|
|
|
+ cImgList: [], // 确保初始化为数组或若依组件需要的格式
|
|
|
cSfzImg: [],
|
|
|
- cImgList: [],
|
|
|
+ nStatus2: 0,
|
|
|
+ nTong: 0,
|
|
|
},
|
|
|
- lifeImg: [],
|
|
|
- projectList: [],
|
|
|
- jsProjectList: [],
|
|
|
+
|
|
|
+ addr: { lat: "", lng: "" }, // 地图回显坐标
|
|
|
+ newAddress: "太原", // 地图默认城市
|
|
|
+
|
|
|
+ projectList: [], // 所有项目
|
|
|
+ jsProjectList: [], // 当前选中的项目对象
|
|
|
+
|
|
|
complainForm: {
|
|
|
cNickName: "匿名评论",
|
|
|
- name: "",
|
|
|
+ nStar: 5,
|
|
|
+ cText: "",
|
|
|
+ dTime: new Date(),
|
|
|
},
|
|
|
- headimg: "",
|
|
|
- show: false,
|
|
|
- addr: {},
|
|
|
- newAddress: "太原",
|
|
|
- cVideo:''
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.complainForm.cJsid = this.$route.query.id;
|
|
|
- this.getJsInfo();
|
|
|
+ const id = this.$route.query.id;
|
|
|
+ if (id) {
|
|
|
+ this.complainForm.cJsid = id;
|
|
|
+ this.getJsInfo(id);
|
|
|
+ }
|
|
|
this.getProjictList();
|
|
|
this.getDept();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 辅助函数:处理视频URL回显(如果是相对路径则加上base_api) */
|
|
|
+ getVideoUrl(url) {
|
|
|
+ if (!url) return '';
|
|
|
+ if (url.indexOf("http") === 0) return url;
|
|
|
+ return process.env.VUE_APP_BASE_API + url;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 视频上传前的校验
|
|
|
beforeVideoUpload(file) {
|
|
|
const isVideo = file.type.includes("video/");
|
|
|
- const isLtSize = file.size / 1024 / 1024 < 100; // 假设限制100MB
|
|
|
+ const isLtSize = file.size / 1024 / 1024 < 100;
|
|
|
|
|
|
if (!isVideo) {
|
|
|
this.$message.error("只能上传视频文件!");
|
|
|
@@ -394,48 +385,35 @@ export default {
|
|
|
if (!isLtSize) {
|
|
|
this.$message.error("视频大小不能超过100MB!");
|
|
|
}
|
|
|
-
|
|
|
return isVideo && isLtSize;
|
|
|
},
|
|
|
|
|
|
+ // 视频自定义上传
|
|
|
handleVideoUpload(options) {
|
|
|
const { file } = options;
|
|
|
- // 这里处理视频上传逻辑,可以使用axios或其他方法
|
|
|
- console.log("上传视频:", file);
|
|
|
-
|
|
|
- // 示例:模拟上传
|
|
|
const formData = new FormData();
|
|
|
formData.append("video", file);
|
|
|
uploadvideo(formData).then((response) => {
|
|
|
- console.log(response);
|
|
|
- this.jsInfos.cVideo =process.env.VUE_APP_BASE_API +response.fileName;
|
|
|
- console.log(this.cVideo);
|
|
|
-
|
|
|
- // this.uploadInfos.cImgList.push(response.fileName);
|
|
|
- // this.jsInfos.cImgList.push(
|
|
|
- // process.env.VUE_APP_BASE_API + response.fileName
|
|
|
- // );
|
|
|
-
|
|
|
- // this.updataImg22.push(response.fileName);
|
|
|
+ // 保存相对路径,显示时处理
|
|
|
+ this.$set(this.jsInfos, 'cVideo', response.fileName);
|
|
|
+ this.$message.success("视频上传成功");
|
|
|
});
|
|
|
-
|
|
|
- // axios.post('/api/upload/video', formData, {
|
|
|
- // onUploadProgress: progressEvent => {
|
|
|
- // const percent = Math.round((progressEvent.loaded * 100) / progressEvent.total);
|
|
|
- // // 可以在这里更新进度条
|
|
|
- // }
|
|
|
- // }).then(response => {
|
|
|
- // // 上传成功处理
|
|
|
- // })
|
|
|
},
|
|
|
+
|
|
|
+ // 地图选点回调
|
|
|
uploadAddressData(payload) {
|
|
|
this.jsInfos.latitude = payload.latitude;
|
|
|
this.jsInfos.longitude = payload.longitude;
|
|
|
this.jsInfos.name = payload.addressName;
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.jsInfos.deptId = val.deptId;
|
|
|
- this.jsInfos.city = val.deptName;
|
|
|
+
|
|
|
+ // 城市选择回调
|
|
|
+ handleSelectionChange(deptId) {
|
|
|
+ // 找到对应的 deptName
|
|
|
+ const obj = this.options.find(item => item.deptId === deptId);
|
|
|
+ if(obj) {
|
|
|
+ this.jsInfos.city = obj.deptName;
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getDept() {
|
|
|
@@ -453,579 +431,182 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getJsInfo() {
|
|
|
- let cOpenId = { id: this.$route.query.id };
|
|
|
- getJs(cOpenId).then((response) => {
|
|
|
- this.jsInfos = response.data;
|
|
|
- this.addr.lat = response.data.latitude;
|
|
|
- this.addr.lng = response.data.longitude;
|
|
|
- this.dz = response.data.name + response.data.address;
|
|
|
- this.uploadInfos.projects = [];
|
|
|
- this.uploadInfos.cPortrait = response.data.cPortrait;
|
|
|
- this.uploadInfos.businessLicense = response.data.businessLicense;
|
|
|
- this.uploadInfos.healthCertificate = response.data.healthCertificate;
|
|
|
- this.uploadInfos.certification = response.data.certification;
|
|
|
- this.uploadInfos.noCrime = response.data.noCrime;
|
|
|
- this.uploadInfos.cSfzImg = response.data.cSfzImg;
|
|
|
- this.uploadInfos.cImgList = response.data.cImgList;
|
|
|
- this.jsInfos.projects.map((item) => {
|
|
|
- this.jsProjectList.push({ cTitle: item.cTitle, cId: item.cId });
|
|
|
- // this.uploadInfos.projects.push(item.cId)
|
|
|
- });
|
|
|
- var imgs = [];
|
|
|
- var imgs2 = [];
|
|
|
- response.data.cPortrait == ""
|
|
|
- ? (this.jsInfos.cPortrait = "")
|
|
|
- : (this.jsInfos.cPortrait =
|
|
|
- process.env.VUE_APP_BASE_API + response.data.cPortrait);
|
|
|
- response.data.businessLicense == ""
|
|
|
- ? (this.jsInfos.businessLicense = "")
|
|
|
- : (this.jsInfos.businessLicense =
|
|
|
- process.env.VUE_APP_BASE_API + response.data.businessLicense);
|
|
|
- response.data.healthCertificate == ""
|
|
|
- ? (this.jsInfos.healthCertificate = "")
|
|
|
- : (this.jsInfos.healthCertificate =
|
|
|
- process.env.VUE_APP_BASE_API + response.data.healthCertificate);
|
|
|
- response.data.certification == ""
|
|
|
- ? (this.jsInfos.certification = "")
|
|
|
- : (this.jsInfos.certification =
|
|
|
- process.env.VUE_APP_BASE_API + response.data.certification);
|
|
|
- response.data.noCrime == ""
|
|
|
- ? (this.jsInfos.noCrime = "")
|
|
|
- : (this.jsInfos.noCrime =
|
|
|
- process.env.VUE_APP_BASE_API + response.data.noCrime);
|
|
|
|
|
|
- // response.data.cImgList.length == 0 ? this.jsInfos.cImgList = [] : response.data.cImgList.forEach((element) => {
|
|
|
- // element = process.env.VUE_APP_BASE_API + element;
|
|
|
- // imgs.push(element);
|
|
|
- // });
|
|
|
- if (response.data.cImgList.length > 0) {
|
|
|
- response.data.cImgList.forEach((element) => {
|
|
|
- element = process.env.VUE_APP_BASE_API + element;
|
|
|
- imgs.push(element);
|
|
|
+ // 获取技师详情
|
|
|
+ getJsInfo(id) {
|
|
|
+ getJs({ id: id }).then((response) => {
|
|
|
+ const data = response.data;
|
|
|
+
|
|
|
+ // 1. 处理地图信息
|
|
|
+ this.addr = {
|
|
|
+ lat: data.latitude,
|
|
|
+ lng: data.longitude
|
|
|
+ };
|
|
|
+
|
|
|
+ // 2. 处理项目回显
|
|
|
+ this.jsProjectList = [];
|
|
|
+ if (data.projects && data.projects.length > 0) {
|
|
|
+ data.projects.forEach((item) => {
|
|
|
+ this.jsProjectList.push({ cTitle: item.cTitle, cId: item.cId });
|
|
|
});
|
|
|
- } else {
|
|
|
- imgs = [];
|
|
|
}
|
|
|
+
|
|
|
+ // 3. 赋值给主对象
|
|
|
+ // 注意:ImageUpload组件通常需要逗号分隔的字符串或数组(取决于版本),若依默认通常存相对路径
|
|
|
+ // 这里假设后端返回的是相对路径,如果不是,ImageUpload会自动处理显示,但v-model最好绑定相对路径
|
|
|
+ this.jsInfos = data;
|
|
|
+
|
|
|
+ // 确保数组类型字段初始化,防止组件报错
|
|
|
+ if (!this.jsInfos.cImgList) this.jsInfos.cImgList = [];
|
|
|
+ if (!this.jsInfos.cSfzImg) this.jsInfos.cSfzImg = [];
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- if (response.data.cSfzImg.length > 0) {
|
|
|
- response.data.cSfzImg.forEach((element) => {
|
|
|
- element = process.env.VUE_APP_BASE_API + element;
|
|
|
- imgs2.push(element);
|
|
|
- });
|
|
|
+ // 提交评论
|
|
|
+ submitComplain() {
|
|
|
+ if (!this.complainForm.nStar) return this.$message.warning("请输入评分");
|
|
|
+ if (!this.complainForm.cText) return this.$message.warning("请输入评论内容");
|
|
|
+ if (!this.complainForm.dTime) return this.$message.warning("请选择评论时间");
|
|
|
+
|
|
|
+ addComplaint(this.complainForm).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("提交成功");
|
|
|
+ this.dialogFormVisible = false;
|
|
|
} else {
|
|
|
- imgs2.cSfzImg = [];
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
-
|
|
|
- // this.jsInfos = response.data;
|
|
|
- this.jsInfos.cImgList = imgs;
|
|
|
- this.jsInfos.cSfzImg = imgs2;
|
|
|
-
|
|
|
- // this.jsInfos.cAddress = JSON.parse(response.data.cAddress) + '('+JSON.parse(response.data.name).name +')'
|
|
|
- this.jsInfos.address = response.data.address;
|
|
|
- this.jsInfos.name = response.data.name;
|
|
|
- this.jsInfos.atlasAdd = response.data.atlasAdd;
|
|
|
- this.ifTong = this.jsInfos.nTong;
|
|
|
- // console.log(this.jsInfos,"rrrrrrrrrrrrrrrrrrr")
|
|
|
- });
|
|
|
- },
|
|
|
- // 上传头像
|
|
|
- handleAvatarSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.cPortrait = response.fileName;
|
|
|
- this.jsInfos.cPortrait =
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName;
|
|
|
});
|
|
|
},
|
|
|
- beforeAvatarUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- this.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //上传营业执照
|
|
|
- handleBusinessSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.businessLicense = response.fileName;
|
|
|
- this.jsInfos.businessLicense =
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName;
|
|
|
- });
|
|
|
- },
|
|
|
- beforeBusinessUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- this.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //上传无犯罪证明
|
|
|
- handleNocrimeSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.noCrime = response.fileName;
|
|
|
- this.jsInfos.noCrime = process.env.VUE_APP_BASE_API + response.fileName;
|
|
|
- });
|
|
|
- },
|
|
|
- beforeNocrimeUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- this.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //上传健康证
|
|
|
- handlehealthSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.healthCertificate = response.fileName;
|
|
|
- this.jsInfos.healthCertificate =
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName;
|
|
|
- });
|
|
|
- },
|
|
|
- beforehealthUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- this.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //上传资格证
|
|
|
- handlecertificationSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.certification = response.fileName;
|
|
|
- this.jsInfos.certification =
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName;
|
|
|
- });
|
|
|
- },
|
|
|
- beforecertificationUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- this.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //添加评论
|
|
|
- submitComplain() {
|
|
|
- if (this.complainForm.nStar == "") {
|
|
|
- this.$message({
|
|
|
- message: "请输入评分",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.complainForm.cText == "") {
|
|
|
- this.$message({
|
|
|
- message: "请输入评论内容",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!this.complainForm.dTime) {
|
|
|
- this.$message({
|
|
|
- message: "请选择评论时间",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- return;
|
|
|
- } else {
|
|
|
- addComplaint(this.complainForm).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "提交成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogFormVisible = false;
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- addComplaintShow(id, jsInfos) {
|
|
|
- this.complainForm.name = jsInfos.cName;
|
|
|
- this.complainForm.cId = jsInfos.cId;
|
|
|
+
|
|
|
+ addComplaintShow() {
|
|
|
+ this.complainForm.name = this.jsInfos.cName;
|
|
|
+ this.complainForm.cId = this.jsInfos.cId;
|
|
|
this.dialogFormVisible = true;
|
|
|
},
|
|
|
- // 上传身份证图片相关
|
|
|
- handlesfzSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- // this.lifeImg.push(response.fileName);
|
|
|
- this.jsInfos.cSfzImg.push(
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName
|
|
|
- );
|
|
|
- this.uploadInfos.cSfzImg.push(response.fileName);
|
|
|
- // this.updataImg22.push(response.fileName);
|
|
|
- });
|
|
|
- },
|
|
|
- beforesfzImagesUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- proxy.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- },
|
|
|
- removesfzImgs(index) {
|
|
|
- this.jsInfos.cSfzImg.splice(index, 1);
|
|
|
- this.uploadInfos.cSfzImg.splice(index, 1);
|
|
|
- // this.updataImg22.splice(index, 1)
|
|
|
- },
|
|
|
- //上传生活照相关
|
|
|
- handleLifeSuccess(file) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("file", file.file);
|
|
|
- upload(formData).then((response) => {
|
|
|
- this.uploadInfos.cImgList.push(response.fileName);
|
|
|
- this.jsInfos.cImgList.push(
|
|
|
- process.env.VUE_APP_BASE_API + response.fileName
|
|
|
- );
|
|
|
|
|
|
- // this.updataImg22.push(response.fileName);
|
|
|
- });
|
|
|
- },
|
|
|
- beforeLifeImagesUpload(file) {
|
|
|
- if (file.type.indexOf("image/") == -1) {
|
|
|
- proxy.$modal.msgError(
|
|
|
- "文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
|
- );
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- },
|
|
|
- removeLifeImgs(index) {
|
|
|
- this.jsInfos.cImgList.splice(index, 1);
|
|
|
- this.uploadInfos.cImgList.splice(index, 1);
|
|
|
- // this.updataImg22.splice(index, 1)
|
|
|
- },
|
|
|
- //上岗、休息
|
|
|
+ // 上岗/下岗切换
|
|
|
work() {
|
|
|
- let data = {};
|
|
|
- data.id = this.$route.query.id;
|
|
|
- data.nStatus2 = this.jsInfos.nStatus2 == 0 ? "-1" : "0";
|
|
|
+ let data = {
|
|
|
+ id: this.jsInfos.id,
|
|
|
+ nStatus2: this.jsInfos.nStatus2 == 0 ? "-1" : "0"
|
|
|
+ };
|
|
|
changeWork(data).then((res) => {
|
|
|
- this.jsProjectList = [];
|
|
|
- this.getJsInfo();
|
|
|
if (res.code == 200) {
|
|
|
- if (this.jsInfos.nStatus2 == 0) {
|
|
|
- this.$message({
|
|
|
- message: "已下岗",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.jsInfos.nStatus2 = 1;
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: "已上岗",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.jsInfos.nStatus2 = 0;
|
|
|
- }
|
|
|
+ this.$message.success(data.nStatus2 == 0 ? "已上岗" : "已下岗");
|
|
|
+ this.getJsInfo(this.jsInfos.id); // 刷新数据
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 拉黑
|
|
|
+
|
|
|
+ // 拉黑/恢复
|
|
|
blacklist() {
|
|
|
- let data = {};
|
|
|
- data.id = this.$route.query.id;
|
|
|
- data.nTong = this.jsInfos.nTong == 3 ? "0" : "3";
|
|
|
+ let data = {
|
|
|
+ id: this.jsInfos.id,
|
|
|
+ nTong: this.jsInfos.nTong == 3 ? "0" : "3"
|
|
|
+ };
|
|
|
block(data).then((res) => {
|
|
|
- this.jsProjectList = [];
|
|
|
- this.getJsInfo();
|
|
|
if (res.code == 200) {
|
|
|
- if (this.jsInfos.nTong == 3) {
|
|
|
- this.$message({
|
|
|
- message: "取消拉黑成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: "拉黑成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$message.success(data.nTong == 3 ? "拉黑成功" : "取消拉黑成功");
|
|
|
+ this.getJsInfo(this.jsInfos.id);
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- //提交
|
|
|
+
|
|
|
+ // 提交修改
|
|
|
submitForm() {
|
|
|
- let temp = [];
|
|
|
- this.jsProjectList.forEach((item) => {
|
|
|
- temp.push(item.cId);
|
|
|
- });
|
|
|
+ // 处理项目ID集合
|
|
|
+ const projectIds = this.jsProjectList.map(item => item.cId).join(",");
|
|
|
+ this.jsInfos.cBhList = projectIds;
|
|
|
+
|
|
|
+ // ImageUpload 组件已经通过 v-model 更新了 jsInfos 中的图片字段
|
|
|
+ // 注意:如果 ImageUpload 返回的是数组,而后端需要逗号分隔字符串,这里需要转换
|
|
|
+ // 假设 cImgList 和 cSfzImg 是数组,其他单图是字符串
|
|
|
+ let submitData = { ...this.jsInfos };
|
|
|
+
|
|
|
+ // 如果后端要求图片是字符串而不是数组,进行转换(视若依版本而定,通用处理如下)
|
|
|
+ if(Array.isArray(submitData.cImgList)) {
|
|
|
+ submitData.cImgList = submitData.cImgList.join(',');
|
|
|
+ }
|
|
|
+ if(Array.isArray(submitData.cSfzImg)) {
|
|
|
+ submitData.cSfzImg = submitData.cSfzImg.join(',');
|
|
|
+ }
|
|
|
|
|
|
- this.jsInfos.cPortrait = this.uploadInfos.cPortrait;
|
|
|
- this.jsInfos.cSfzImg = this.uploadInfos.cSfzImg;
|
|
|
- this.jsInfos.cImgList = this.uploadInfos.cImgList;
|
|
|
- this.jsInfos.businessLicense = this.uploadInfos.businessLicense;
|
|
|
- this.jsInfos.certification = this.uploadInfos.certification;
|
|
|
- this.jsInfos.healthCertificate = this.uploadInfos.healthCertificate;
|
|
|
- this.jsInfos.noCrime = this.uploadInfos.noCrime;
|
|
|
- this.jsInfos.cBhList = temp.join();
|
|
|
- this.jsInfos.comments = null;
|
|
|
- updateJs(this.jsInfos).then((res) => {
|
|
|
- this.jsProjectList = [];
|
|
|
- this.getJsInfo();
|
|
|
+ updateJs(submitData).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "提交成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ this.$message.success("修改成功");
|
|
|
this.$router.go(-1);
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.$router.go(-1);
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 审核
|
|
|
- auditJs(ids) {
|
|
|
- if (this.ifTong == 0) {
|
|
|
- var data = {
|
|
|
- id: ids,
|
|
|
- };
|
|
|
- auditJs(data).then((response) => {
|
|
|
- this.$modal.msgSuccess("审核通过");
|
|
|
- this.drawer = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$modal.msgSuccess("该技师已操作");
|
|
|
- }
|
|
|
+
|
|
|
+ // 审核通过
|
|
|
+ auditJs(id) {
|
|
|
+ if (this.jsInfos.nTong != 0) return this.$message.warning("该技师已操作");
|
|
|
+ auditJs({ id }).then(() => {
|
|
|
+ this.$message.success("审核通过");
|
|
|
+ this.getJsInfo(id);
|
|
|
+ });
|
|
|
},
|
|
|
- // 退回申请
|
|
|
- returnJs(ids) {
|
|
|
+
|
|
|
+ // 退回
|
|
|
+ returnJs(id) {
|
|
|
+ if (this.jsInfos.nTong != 0) return this.$message.warning("该技师已操作");
|
|
|
this.$prompt("请输入退回原因", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- })
|
|
|
- .then(({ value }) => {
|
|
|
- if (this.ifTong == 0) {
|
|
|
- var data = {
|
|
|
- id: ids,
|
|
|
- reasonRefusal: value,
|
|
|
- };
|
|
|
- repulseJs(data).then((response) => {
|
|
|
- this.$modal.msgSuccess("已退回");
|
|
|
- this.drawer = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$modal.msgSuccess("该技师已操作");
|
|
|
- }
|
|
|
- // this.$message({
|
|
|
- // type: "success",
|
|
|
- // });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "info",
|
|
|
- message: "取消输入",
|
|
|
+ }).then(({ value }) => {
|
|
|
+ repulseJs({ id, reasonRefusal: value }).then(() => {
|
|
|
+ this.$message.success("已退回");
|
|
|
+ this.getJsInfo(id);
|
|
|
});
|
|
|
- });
|
|
|
+ }).catch(() => {});
|
|
|
},
|
|
|
- rest() {},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.map_point {
|
|
|
- .open {
|
|
|
- width: 460px;
|
|
|
- margin: 300px auto;
|
|
|
- .info {
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-.el-form-item {
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-
|
|
|
-.details {
|
|
|
+.app-container {
|
|
|
padding: 20px;
|
|
|
-
|
|
|
- .title {
|
|
|
- border-left: 3px solid #2cb8d4;
|
|
|
- padding-left: 5px;
|
|
|
- font-size: 30rpx;
|
|
|
- margin: 10px 0px;
|
|
|
- text-align: left;
|
|
|
- }
|
|
|
-
|
|
|
- .image {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- display: flex;
|
|
|
- margin-right: 20px;
|
|
|
-
|
|
|
- img {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
+ background-color: #f0f2f5;
|
|
|
+ min-height: 100vh;
|
|
|
}
|
|
|
|
|
|
-.images_box {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- float: left;
|
|
|
+.box-card {
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
-.imgslist .imgs {
|
|
|
- float: left;
|
|
|
- margin-right: 10px;
|
|
|
- position: relative;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- margin-bottom: 10px;
|
|
|
- cursor: pointer;
|
|
|
+.section-title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #303133;
|
|
|
+ padding-left: 10px;
|
|
|
+ border-left: 4px solid #409EFF;
|
|
|
}
|
|
|
-.imgslist .sfzimg {
|
|
|
- float: left;
|
|
|
- margin-right: 10px;
|
|
|
- position: relative;
|
|
|
- width: 200px;
|
|
|
- height: 150px;
|
|
|
- margin-bottom: 10px;
|
|
|
- cursor: pointer;
|
|
|
- img {
|
|
|
- width: 100%;
|
|
|
+
|
|
|
+.video-uploader {
|
|
|
+ .video-preview {
|
|
|
+ width: 240px;
|
|
|
height: 100%;
|
|
|
+ object-fit: contain;
|
|
|
}
|
|
|
}
|
|
|
-.imgslist .sfzimg:hover:before {
|
|
|
- content: "";
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: rgba(0, 0, 0, 0.5);
|
|
|
- color: #fff;
|
|
|
-}
|
|
|
-.imgslist .sfzimg .ifnone {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- color: #fff;
|
|
|
- display: none;
|
|
|
- width: 100%;
|
|
|
- text-align: center;
|
|
|
- line-height: 150px;
|
|
|
-}
|
|
|
-
|
|
|
-.imgslist .sfzimg:hover .ifnone {
|
|
|
- display: block;
|
|
|
-}
|
|
|
|
|
|
-.imgslist .sfzimg:hover:before {
|
|
|
- content: "";
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
+.footer-actions {
|
|
|
+ padding: 10px 20px;
|
|
|
+ text-align: right;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
|
|
|
+ position: fixed;
|
|
|
left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: rgba(0, 0, 0, 0.5);
|
|
|
- color: #fff;
|
|
|
-}
|
|
|
-
|
|
|
-.imgslist .imgs .ifnone {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- color: #fff;
|
|
|
- display: none;
|
|
|
- width: 100%;
|
|
|
- text-align: center;
|
|
|
- line-height: 100px;
|
|
|
-}
|
|
|
-
|
|
|
-.imgslist .imgs:hover .ifnone {
|
|
|
- display: block;
|
|
|
-}
|
|
|
-
|
|
|
-.images_box {
|
|
|
- float: left;
|
|
|
-}
|
|
|
-
|
|
|
-.imgslist img {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
-}
|
|
|
-
|
|
|
-.el-form-item {
|
|
|
- display: flex;
|
|
|
-
|
|
|
- ::v-deep .el-form-item__label {
|
|
|
- width: 9%;
|
|
|
- text-align: left;
|
|
|
- }
|
|
|
-
|
|
|
- ::v-deep.el-form-item__content {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.avatar-uploader .el-upload {
|
|
|
- border: 1px dashed #d9d9d9;
|
|
|
- border-radius: 6px;
|
|
|
- cursor: pointer;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
-}
|
|
|
-
|
|
|
-.avatar-uploader .el-upload:hover {
|
|
|
- border-color: #409eff;
|
|
|
-}
|
|
|
-
|
|
|
-.avatar-uploader-icon {
|
|
|
- font-size: 28px;
|
|
|
- color: #8c939d;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- line-height: 100px;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-
|
|
|
-.avatar {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- display: block;
|
|
|
-}
|
|
|
-
|
|
|
-.el-pagination {
|
|
|
- float: right;
|
|
|
- padding: 30px 0;
|
|
|
-}
|
|
|
-
|
|
|
-::v-deep .el-select {
|
|
|
- width: 100%;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 10;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|