From 03f0e2a3220106ec2a9dd8f53d3ef5ab824c3ae7 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 10 一月 2025 09:47:02 +0800
Subject: [PATCH] 添加OCR

---
 src/views/enterprise/saleuser.vue |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/views/enterprise/saleuser.vue b/src/views/enterprise/saleuser.vue
index 6a11f38..46edce6 100644
--- a/src/views/enterprise/saleuser.vue
+++ b/src/views/enterprise/saleuser.vue
@@ -260,6 +260,12 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
+                <el-form-item label="禁用OCR:" prop="disableocr" v-if="isAdmin">
+                    <el-radio-group v-model="dataForm.disableocr">
+                        <el-radio :label="1">是</el-radio>
+                        <el-radio :label="0">否</el-radio>
+                    </el-radio-group>
+                </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <el-button @click="dialogFormVisible = false">取消</el-button>
@@ -418,6 +424,7 @@
                     community: '',
                     type:'',
                     job:'',
+                    disableocr: null
                 },
                 enterpriseId:'',
                 authDialogVisible:false,
@@ -451,12 +458,19 @@
                 confirmPasswordType: 'password',
                 templateRadio: '',
                 instituteList: [],
-                departmentList: []
+                departmentList: [],
+                isAdmin: false
             }
         },
         created() {
             this.getUserList()
             this.getProvince()
+            const roles = JSON.parse(Cookies.get('roles'))
+            if(roles.find(i=>i.name == '管理员')){
+                this.isAdmin = true
+            }else{
+                this.isAdmin = false
+            }
         },
         methods: {
             refreshHandle: function() {
@@ -598,7 +612,8 @@
                     town: '',
                     community: '',
                     type: '',
-                    job: ''
+                    job: '',
+                    disableocr: null
                 }
                 this.cityList = []
                 this.areaList = []
@@ -715,6 +730,7 @@
                 this.dataForm.community = row.community
                 this.dataForm.job = row.job
                 this.dataForm.type = row.type
+                this.dataForm.disableocr = row.disableocr
                 this.dialogFormVisible = true
                 this.$nextTick(() => {
                     this.$refs['dataForm'].clearValidate()

--
Gitblit v1.9.2