马宇豪
2025-01-10 03f0e2a3220106ec2a9dd8f53d3ef5ab824c3ae7
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;