|
@@ -15,12 +15,13 @@
|
|
|
style="width: 200px"
|
|
|
v-model:value="params.paperTypeBarcodeContentItem"
|
|
|
allow-clear
|
|
|
+ :disabled="!canEdit"
|
|
|
/>
|
|
|
<qm-button
|
|
|
class="m-l-8px"
|
|
|
:icon="h(PlusCircleOutlined)"
|
|
|
@click="addTag"
|
|
|
- :disabled="!params.paperTypeBarcodeContentItem"
|
|
|
+ :disabled="!params.paperTypeBarcodeContentItem || !canEdit"
|
|
|
>新增</qm-button
|
|
|
>
|
|
|
</div>
|
|
@@ -35,7 +36,9 @@
|
|
|
:style="{ color: token.colorPrimary }"
|
|
|
>
|
|
|
{{ item }}
|
|
|
- <span class="close" @click="delTag(index)">×</span>
|
|
|
+ <span class="close" v-if="canEdit" @click="delTag(index)"
|
|
|
+ >×</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -46,6 +49,7 @@
|
|
|
v-model:value="params.imageCheckRatio"
|
|
|
:max="100"
|
|
|
:min="0"
|
|
|
+ :disabled="!canEdit"
|
|
|
/>
|
|
|
<span>%</span>
|
|
|
</div>
|
|
@@ -56,6 +60,7 @@
|
|
|
v-model:value="params.scannerAssignedMaxCount"
|
|
|
:max="100"
|
|
|
:min="0"
|
|
|
+ :disabled="!canEdit"
|
|
|
/>
|
|
|
<span>张</span>
|
|
|
</div>
|
|
@@ -63,22 +68,37 @@
|
|
|
</qm-low-form>
|
|
|
|
|
|
<div class="btns">
|
|
|
- <!-- <qm-button :icon="h(EditOutlined)">编辑</qm-button> -->
|
|
|
- <qm-button type="primary" @click="save">保存</qm-button>
|
|
|
+ <qm-button
|
|
|
+ :icon="h(EditOutlined)"
|
|
|
+ class="mr-10px"
|
|
|
+ v-if="!canEdit"
|
|
|
+ @click="canEdit = !canEdit"
|
|
|
+ >编辑</qm-button
|
|
|
+ >
|
|
|
+ <qm-button
|
|
|
+ :icon="h(EditOutlined)"
|
|
|
+ class="mr-10px"
|
|
|
+ v-else
|
|
|
+ @click="canEdit = !canEdit"
|
|
|
+ >取消编辑</qm-button
|
|
|
+ >
|
|
|
+ <qm-button type="primary" :icon="h(SaveOutlined)" @click="save"
|
|
|
+ >保存</qm-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script name="ScanParams" lang="ts" setup>
|
|
|
-import { ref, h, onMounted, reactive } from "vue";
|
|
|
-import { PlusCircleOutlined } from "@ant-design/icons-vue";
|
|
|
+import { ref, h, onMounted, reactive, computed } from "vue";
|
|
|
+import { PlusCircleOutlined, SaveOutlined } from "@ant-design/icons-vue";
|
|
|
import useToken from "@/hooks/useToken";
|
|
|
import { EditOutlined } from "@ant-design/icons-vue";
|
|
|
import { getBaseDataConfig, saveBaseDataConfig } from "@/ap/baseDataConfig";
|
|
|
import { useUserStore } from "@/store";
|
|
|
|
|
|
const form = ref();
|
|
|
-
|
|
|
+const canEdit = ref(false);
|
|
|
const userStore = useUserStore();
|
|
|
const { token } = useToken();
|
|
|
const getData = () => {
|
|
@@ -103,81 +123,88 @@ const params = reactive<any>({
|
|
|
scannerAssignedMaxCount: "",
|
|
|
scannerAssignedVerifyPassword: "",
|
|
|
});
|
|
|
-const fields = ref([
|
|
|
- {
|
|
|
- cell: "label1",
|
|
|
- label: "卷型条码内容",
|
|
|
- colSpan: 4,
|
|
|
- labelWidth: 130,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "paperTypeBarcodeContentItem",
|
|
|
- cell: "paperTypeBarcodeContentItem",
|
|
|
- label: "",
|
|
|
- labelWidth: 0,
|
|
|
- colSpan: 20,
|
|
|
- },
|
|
|
- {
|
|
|
- cell: "label2",
|
|
|
- label: "图片检查",
|
|
|
- colSpan: 4,
|
|
|
- labelWidth: 130,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "imageCheckRatio",
|
|
|
- cell: "imageCheckRatio",
|
|
|
- label: "抽查比例",
|
|
|
- colSpan: 10,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "imageCheckOrder",
|
|
|
- type: "select",
|
|
|
- attrs: {
|
|
|
- options: [
|
|
|
- { value: "DESC", label: "最新扫描批次" },
|
|
|
- { value: "ASC", label: "批次顺序" },
|
|
|
- ],
|
|
|
+const fields = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ cell: "label1",
|
|
|
+ label: "卷型条码内容",
|
|
|
+ colSpan: 4,
|
|
|
+ labelWidth: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "paperTypeBarcodeContentItem",
|
|
|
+ cell: "paperTypeBarcodeContentItem",
|
|
|
+ label: "",
|
|
|
+ labelWidth: 0,
|
|
|
+ colSpan: 20,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ cell: "label2",
|
|
|
+ label: "图片检查",
|
|
|
+ colSpan: 4,
|
|
|
+ labelWidth: 130,
|
|
|
},
|
|
|
- label: "检查顺序",
|
|
|
- colSpan: 10,
|
|
|
- },
|
|
|
- {
|
|
|
- cell: "label3",
|
|
|
- label: "实时审核",
|
|
|
- colSpan: 4,
|
|
|
- labelWidth: 130,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "enableSyncVerify",
|
|
|
- label: "",
|
|
|
- colSpan: 20,
|
|
|
- type: "radio",
|
|
|
- attrs: {
|
|
|
- options: [
|
|
|
- { label: "是", value: true },
|
|
|
- { label: "否", value: false },
|
|
|
- ],
|
|
|
+ {
|
|
|
+ prop: "imageCheckRatio",
|
|
|
+ cell: "imageCheckRatio",
|
|
|
+ label: "抽查比例",
|
|
|
+ colSpan: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "imageCheckOrder",
|
|
|
+ type: "select",
|
|
|
+ attrs: {
|
|
|
+ options: [
|
|
|
+ { value: "DESC", label: "最新扫描批次" },
|
|
|
+ { value: "ASC", label: "批次顺序" },
|
|
|
+ ],
|
|
|
+ disabled: !canEdit.value,
|
|
|
+ },
|
|
|
+ label: "检查顺序",
|
|
|
+ colSpan: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ cell: "label3",
|
|
|
+ label: "实时审核",
|
|
|
+ colSpan: 4,
|
|
|
+ labelWidth: 130,
|
|
|
},
|
|
|
- },
|
|
|
- {
|
|
|
- cell: "label3",
|
|
|
- label: "人工绑定锁屏控制",
|
|
|
- colSpan: 4,
|
|
|
- labelWidth: 130,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "scannerAssignedMaxCount",
|
|
|
- cell: "scannerAssignedMaxCount",
|
|
|
- label: "锁屏数量",
|
|
|
- colSpan: 10,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "scannerAssignedVerifyPassword",
|
|
|
- type: "password",
|
|
|
- colSpan: 10,
|
|
|
- label: "解锁密码",
|
|
|
- },
|
|
|
-]);
|
|
|
+ {
|
|
|
+ prop: "enableSyncVerify",
|
|
|
+ label: "",
|
|
|
+ colSpan: 20,
|
|
|
+ type: "radio",
|
|
|
+ attrs: {
|
|
|
+ options: [
|
|
|
+ { label: "是", value: true },
|
|
|
+ { label: "否", value: false },
|
|
|
+ ],
|
|
|
+ disabled: !canEdit.value,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ cell: "label3",
|
|
|
+ label: "人工绑定锁屏控制",
|
|
|
+ colSpan: 4,
|
|
|
+ labelWidth: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "scannerAssignedMaxCount",
|
|
|
+ cell: "scannerAssignedMaxCount",
|
|
|
+ label: "锁屏数量",
|
|
|
+ colSpan: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "scannerAssignedVerifyPassword",
|
|
|
+ type: "password",
|
|
|
+ colSpan: 10,
|
|
|
+ label: "解锁密码",
|
|
|
+ attrs: {
|
|
|
+ disabled: !canEdit.value,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
|
|
|
const addTag = () => {
|
|
|
params.paperTypeBarcodeContent.push(params.paperTypeBarcodeContentItem);
|
|
@@ -224,7 +251,7 @@ const save = () => {
|
|
|
overflow: auto;
|
|
|
.btns {
|
|
|
padding-top: 60px;
|
|
|
- padding-left: 150px;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
.ccbl {
|
|
|
color: @text-color1;
|