update:图纸管理界面更新
This commit is contained in:
@@ -10,18 +10,21 @@
|
||||
<div class="tool-bar">
|
||||
<a-space>
|
||||
<a-button>重新加盖二维码</a-button>
|
||||
<a-button>修改合格状态</a-button>
|
||||
<a-button>合格图纸盖章</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-table :dataSource="drawingPapers" :columns="columns" size="small">
|
||||
<template #DrawPaper="{ record}">
|
||||
<template #DrawPaper="{ record }">
|
||||
<a-checkbox
|
||||
v-if="record.checkBox"
|
||||
v-if="selecting && record.checkBox"
|
||||
v-model:checked="selectIds[record.id]"
|
||||
@change="e => onChange(record, e)"
|
||||
></a-checkbox>
|
||||
{{ record.DrawPaper }}
|
||||
>
|
||||
{{ record.DrawPaper }}
|
||||
</a-checkbox>
|
||||
<div v-else>
|
||||
{{ record.DrawPaper }}
|
||||
</div>
|
||||
</template>
|
||||
<template #tags="{ record }">
|
||||
<span v-for="tag in record.tags" :key="tag">
|
||||
@@ -44,12 +47,24 @@
|
||||
</a-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-radio-group
|
||||
@change="e => changeQualified([record.id], e.target.value)"
|
||||
v-if="record.id"
|
||||
v-model:value="record.IsQualified"
|
||||
button-style="solid"
|
||||
size="small"
|
||||
>
|
||||
<a-radio-button :value="true">合格</a-radio-button>
|
||||
<a-radio-button :value="false">不合格</a-radio-button>
|
||||
</a-radio-group>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<style></style>
|
||||
<script>
|
||||
import { ref } from "@vue/runtime-core";
|
||||
import { get } from "@/services/http";
|
||||
import { get, post } from "@/services/http";
|
||||
import {
|
||||
CheckCircleOutlined,
|
||||
CloseCircleOutlined,
|
||||
@@ -63,6 +78,7 @@ export default {
|
||||
},
|
||||
setup() {
|
||||
let rawResult;
|
||||
const selecting = ref(false);
|
||||
const selectIds = ref({});
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -92,7 +108,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action"
|
||||
key: "action",
|
||||
slots: { customRender: "action" }
|
||||
}
|
||||
]);
|
||||
const drawingPapers = ref([]);
|
||||
@@ -153,10 +170,6 @@ export default {
|
||||
};
|
||||
var tags = [
|
||||
{ text: "二维码", value: dp.IsQRCoded },
|
||||
{
|
||||
text: "合格",
|
||||
value: dp.IsQualified
|
||||
},
|
||||
{
|
||||
text: "盖章",
|
||||
value: dp.IsSignature
|
||||
@@ -180,6 +193,7 @@ export default {
|
||||
DrawPaper: `${dp.DrawNum}-${dp.DrawName}`,
|
||||
checkBox: true,
|
||||
WebFileName: dp.WebFileName,
|
||||
IsQualified: dp.IsQualified,
|
||||
tags //展示标签 合格,不合格, 二维码 相关专业,盖章未盖章
|
||||
});
|
||||
}
|
||||
@@ -205,13 +219,23 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
async function changeQualified(ids, isQualified) {
|
||||
var res = await post("/api2/repair/ModifyDrawingPaperQualified", {
|
||||
ids,
|
||||
isQualified
|
||||
});
|
||||
console.log(res);
|
||||
}
|
||||
|
||||
return {
|
||||
selecting,
|
||||
drawingPapers,
|
||||
getDrawingPapers,
|
||||
columns,
|
||||
form,
|
||||
selectIds,
|
||||
onChange
|
||||
onChange,
|
||||
changeQualified
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user