|
@@ -454,6 +454,63 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-divider content-position="left"
|
|
|
|
+ ><el-icon><EditPen /></el-icon> 手签章</el-divider
|
|
|
|
+ >
|
|
|
|
+ <el-row :gutter="15">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <!--<el-upload
|
|
|
|
+ class="avatar-uploader"
|
|
|
|
+ :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :on-success="handleAvatarSuccess"
|
|
|
|
+ >
|
|
|
|
+ <img v-if="imageUrl" :src="imageUrl" class="avatar" />
|
|
|
|
+ <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
|
+ </el-upload>-->
|
|
|
|
+ <el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
|
|
|
|
+ :limit="limitNum"
|
|
|
|
+ :disabled="hideUploadEdit"
|
|
|
|
+ list-type="picture-card"
|
|
|
|
+ :auto-upload="true"
|
|
|
|
+ :on-success="handleUploadSuccess"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ >
|
|
|
|
+ <el-icon><Plus /></el-icon>
|
|
|
|
+
|
|
|
|
+ <template #file="{ file }">
|
|
|
|
+ <div>
|
|
|
|
+ <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
|
|
|
|
+ <span class="el-upload-list__item-actions">
|
|
|
|
+ <span
|
|
|
|
+ class="el-upload-list__item-preview"
|
|
|
|
+ @click="handlePictureCardPreview(file)"
|
|
|
|
+ >
|
|
|
|
+ <el-icon><zoom-in /></el-icon>
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ class="el-upload-list__item-delete"
|
|
|
|
+ @click="handleDownload(file)"
|
|
|
|
+ >
|
|
|
|
+ <el-icon><Download /></el-icon>
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ v-if="!testDisabledFlag"
|
|
|
|
+ class="el-upload-list__item-delete"
|
|
|
|
+ @click="handleRemove(file,fileList)"
|
|
|
|
+ >
|
|
|
|
+ <el-icon><Delete /></el-icon>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-upload>
|
|
|
|
+ <el-dialog v-model="dialogVisible">
|
|
|
|
+ <img w-full :src="inputForm.handSignatureUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
<!-- <template #footer>
|
|
<!-- <template #footer>
|
|
@@ -485,17 +542,26 @@ import userService from "@/api/sys/userService";
|
|
import postService from "@/api/sys/postService";
|
|
import postService from "@/api/sys/postService";
|
|
import roleService from "@/api/sys/roleService";
|
|
import roleService from "@/api/sys/roleService";
|
|
import officeService from "@/api/sys/officeService";
|
|
import officeService from "@/api/sys/officeService";
|
|
|
|
+import OSSSerivce, {
|
|
|
|
+ httpRequest,
|
|
|
|
+ fileName,
|
|
|
|
+ toHref,
|
|
|
|
+} from '@/api/sys/OSSService'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
visible: false,
|
|
visible: false,
|
|
loading: false,
|
|
loading: false,
|
|
|
|
+ dialogVisible: false,
|
|
title: "",
|
|
title: "",
|
|
method: "",
|
|
method: "",
|
|
roleList: [],
|
|
roleList: [],
|
|
postList: [],
|
|
postList: [],
|
|
companyTreeData: [],
|
|
companyTreeData: [],
|
|
officeTreeData: [],
|
|
officeTreeData: [],
|
|
|
|
+ limitNum: 1,
|
|
|
|
+ hideUploadEdit: false, //控制上传点击
|
|
|
|
+ fileList: [],
|
|
inputForm: {
|
|
inputForm: {
|
|
id: "",
|
|
id: "",
|
|
tenantDTO: {
|
|
tenantDTO: {
|
|
@@ -528,9 +594,13 @@ export default {
|
|
confirmNewPassword: "",
|
|
confirmNewPassword: "",
|
|
sign: "", // 签名
|
|
sign: "", // 签名
|
|
remarks: "", // 备注
|
|
remarks: "", // 备注
|
|
|
|
+ handSignatureUrl:"",//手签章
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ created () {
|
|
|
|
+ this.ossService = new OSSSerivce()
|
|
|
|
+ },
|
|
components: {
|
|
components: {
|
|
SelectTree
|
|
SelectTree
|
|
},
|
|
},
|
|
@@ -545,6 +615,8 @@ export default {
|
|
this.title = "查看用户";
|
|
this.title = "查看用户";
|
|
}
|
|
}
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
|
+ this.hideUploadEdit =false
|
|
|
|
+ this.dialogVisible =false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
if (this.$refs.inputForm !== undefined) {
|
|
if (this.$refs.inputForm !== undefined) {
|
|
this.$refs.inputForm.resetFields();
|
|
this.$refs.inputForm.resetFields();
|
|
@@ -555,9 +627,20 @@ export default {
|
|
if (method === "edit" || method === "view") {
|
|
if (method === "edit" || method === "view") {
|
|
// 修改或者查看
|
|
// 修改或者查看
|
|
let p = userService.queryById(this.inputForm.id);
|
|
let p = userService.queryById(this.inputForm.id);
|
|
- this.initTenant(p).then((data) => {
|
|
|
|
|
|
+ this.initTenant(p).then(async (data) => {
|
|
this.inputForm = this.recover(this.inputForm, data);
|
|
this.inputForm = this.recover(this.inputForm, data);
|
|
this.inputForm.oldLoginName = this.inputForm.loginName;
|
|
this.inputForm.oldLoginName = this.inputForm.loginName;
|
|
|
|
+ this.fileList = []
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.handSignatureUrl)){
|
|
|
|
+ await this.ossService.getTemporaryUrl(this.inputForm.handSignatureUrl).then((data) => {
|
|
|
|
+ console.log('data',data)
|
|
|
|
+ let file = {
|
|
|
|
+ url: data
|
|
|
|
+ }
|
|
|
|
+ this.hideUploadEdit = true, //控制上传点击
|
|
|
|
+ this.fileList.push(file)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.initTenant();
|
|
this.initTenant();
|
|
@@ -692,6 +775,35 @@ export default {
|
|
callback();
|
|
callback();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ handleUploadSuccess(response, file,fileList) {
|
|
|
|
+ return this.handleAvatarSuccess(response,file,fileList,null,'front')
|
|
|
|
+ },
|
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
|
+ this.inputForm.handSignatureUrl = file.url
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
+ },
|
|
|
|
+ handleDownload(file) {
|
|
|
|
+ let file2 = {
|
|
|
|
+ url: this.inputForm.handSignatureUrl
|
|
|
|
+ }
|
|
|
|
+ toHref(file2)
|
|
|
|
+ },
|
|
|
|
+ handleRemove(file, fileList) {
|
|
|
|
+ this.hideUploadEdit = false
|
|
|
|
+ // 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
|
|
|
|
+ const fileIndex = this.fileList.indexOf(file);
|
|
|
|
+ if (fileIndex !== -1) {
|
|
|
|
+ this.fileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleAvatarSuccess (res, file, fileList, index, val) {
|
|
|
|
+ console.log('res',res)
|
|
|
|
+ if (val === 'front') {
|
|
|
|
+ this.inputForm.handSignatureUrl = "/"+res.url
|
|
|
|
+ }
|
|
|
|
+ this.hideUploadEdit = true
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|