马宇豪
2025-01-10 03f0e2a3220106ec2a9dd8f53d3ef5ab824c3ae7
添加OCR
已修改3个文件
45 ■■■■■ 文件已修改
src/views/enterprise/components/authDetail.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/enterprise/saleuser.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/person.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/enterprise/components/authDetail.vue
@@ -36,6 +36,11 @@
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="OCR状态" prop="isocr" align="center">
                <template slot-scope="scope">
                    {{scope.row.isocr == 0?'禁用':scope.row.isocr == 1?'启用':'--'}}
                </template>
            </el-table-column>
            <el-table-column label="创建时间" prop="createdat" align="center">
            </el-table-column>
            <el-table-column label="最后登录时间" prop="lasttime" align="center">
@@ -61,6 +66,10 @@
                    :label="item.name"
                    :value="item.id">
                </el-option>
            </el-select>
            <el-select v-model="isocr" placeholder="请选择是否启用OCR">
                <el-option class="filter-item" label="启用OCR" :value="1"></el-option>
                <el-option class="filter-item" label="禁用OCR" :value="0"></el-option>
            </el-select>
            <div slot="footer" class="dialog-footer">
                <el-button @click="addAuthDialogVisible = false">取消</el-button>
@@ -94,6 +103,7 @@
                flagList:[{id:0,name:"标配"},{id:1,name:"无身份证阅读器"},{id:2,name:"无扫码枪"},{id:3,name:"全无"}],
                contractCode:"",
                flag:0,
                isocr: 0
            }
        },
        computed: {
@@ -149,13 +159,17 @@
            createAuthHandle() {
                this.addAuthDialogVisible = true;
                this.contractCode = ''
                this.flag = 0
                this.isocr = 0
            },
            createAuth(){
                const param = {
                    userId:this.userId,
                    contractCode:this.contractCode,
                    flag:this.flag
                    flag:this.flag,
                    isocr: this.isocr
                };
                createAuth(param).then(response=>{
                    const res = response.data;
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()
src/views/purchase/person.vue
@@ -29,6 +29,13 @@
                        </el-option>
                    </el-select>
                </div>
                <div class="basic_search" style="padding-top: 10px;margin-left: 20px" >
                    <span>OCR识别:</span>
                    <el-select v-model="listQuery.filter.isOcr" placeholder="请选择" style="width:100px">
                        <el-option label="是" key="1" :value="1"></el-option>
                        <el-option label="否" key="0" :value="0"></el-option>
                    </el-select>
                </div>
            </div>
            <div style="margin-top: 10px;">
                <div style="display: block">
@@ -234,6 +241,7 @@
                    parententerprisename:'',
                    directioncode:'',
                    isNeedUploadPhoto:'',
                    isOcr: null,
                    province:'',
                    city:'',
                    district:'',
@@ -415,6 +423,7 @@
                    parententerprisename:'',
                    directioncode:'',
                    isNeedUploadPhoto:'',
                    isOcr: null,
                    province:'',
                    city:'',
                    district:'',