Compare commits

..

No commits in common. "9f844d2c1bb486a23f37afd2cb23acc70de88a8f" and "141a8891ec320f4e80e001e4fb2a09c480b96a88" have entirely different histories.

11 changed files with 94 additions and 140 deletions

View File

@ -8,20 +8,20 @@ const props = defineProps({
//** */ //** */
id: { id: {
type: Number, type: Number,
default: -1, default: -1
}, },
tableData: { tableData: {
type: Object as PropType<TableConfig>, type: Object as PropType<TableConfig>,
default: null, default: null
}, },
row: { row: {
type: Object, type: Object,
default: null, default: null
}, },
tagData: { tagData: {
type: Object, type: Object,
default: () => {}, default: () => {}
}, }
}); });
const emit = defineEmits(["handlePagedCallback"]); const emit = defineEmits(["handlePagedCallback"]);
const editFormRef = ref<FormInstance>(); const editFormRef = ref<FormInstance>();
@ -34,12 +34,12 @@ const editData = ref({
{ {
required: true, required: true,
message: "不能为空", message: "不能为空",
trigger: "blur", trigger: "blur"
}, }
], ],
formLabelWidth: "120px", formLabelWidth: "120px",
size: "small", size: "small",
loading: false, loading: false
}); });
const Api = new hTableAPI(editData.value.table.apiUrl); const Api = new hTableAPI(editData.value.table.apiUrl);
onMounted(() => { onMounted(() => {
@ -69,7 +69,7 @@ function handlePagedCallback() {
emit("handlePagedCallback"); // emit("handlePagedCallback"); //
} }
function handleSubmitForm() { function handleSubmitForm() {
editFormRef.value.validate((valid) => { editFormRef.value.validate(valid => {
if (!valid) { if (!valid) {
return; return;
} }
@ -88,7 +88,7 @@ function handleSubmitForm() {
if (editData.value.table.editCallback) { if (editData.value.table.editCallback) {
editData.value.table.editCallback(form); editData.value.table.editCallback(form);
} }
Api.edit(form).then((res) => { Api.edit(form).then(res => {
editData.value.loading = false; editData.value.loading = false;
if (res.code === 200) { if (res.code === 200) {
ElMessage.success("操作成功"); ElMessage.success("操作成功");
@ -105,7 +105,7 @@ function handleResetForm() {
if (Array.isArray(item.valueE)) { if (Array.isArray(item.valueE)) {
item.valueE = []; item.valueE = [];
} else if (typeof item.valueE === "number") { } else if (typeof item.valueE === "number") {
item.valueE = ""; item.valueE = 0;
} else if (typeof item.valueE === "boolean") { } else if (typeof item.valueE === "boolean") {
item.valueE = false; item.valueE = false;
} else { } else {
@ -118,7 +118,7 @@ function fetchFormData() {
editData.value.loading = false; editData.value.loading = false;
if (editData.value.isedit) { if (editData.value.isedit) {
handleResetForm(); handleResetForm();
Api.Info(props.id).then((res) => { Api.Info(props.id).then(res => {
if (res.code === 200) { if (res.code === 200) {
editData.value.frorm = res.data; editData.value.frorm = res.data;
for (const key in column.value) { for (const key in column.value) {
@ -201,12 +201,19 @@ function fetchFormData() {
/> />
</div> </div>
<div v-else> <div v-else>
<el-input v-model="o.valueE as string" class="elWidth" :placeholder="o.label" /> <el-input
v-model="o.valueE as string"
class="elWidth"
:placeholder="o.label"
/>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" :loading="!editData.loading" @click="handleSubmitForm()" <el-button
type="primary"
:loading="!editData.loading"
@click="handleSubmitForm()"
>立即提交</el-button >立即提交</el-button
> >
<el-button @click="handleResetForm()">重置</el-button> <el-button @click="handleResetForm()">重置</el-button>

View File

@ -185,9 +185,6 @@ function handleAdd() {
dialog.value.edit.visible = true; dialog.value.edit.visible = true;
dialog.value.visible = true; dialog.value.visible = true;
dialog.value.width = "500px"; dialog.value.width = "500px";
dialog.value.edit.row = null;
dialog.value.edit.tagData = null;
} }
function handleEdit(obj, row) { function handleEdit(obj, row) {
dialog.value.edit.id = row[0].id; dialog.value.edit.id = row[0].id;
@ -249,23 +246,8 @@ function handleAddCallback() {
dialog.value.visible = false; dialog.value.visible = false;
dialog.value.edit.visible = false; dialog.value.edit.visible = false;
dialog.value.custom.visible = false; dialog.value.custom.visible = false;
handleResetForm();
handleReloadPaged(); handleReloadPaged();
} }
function handleResetForm() {
for (const key in table.value.column) {
let item = table.value.column[key];
if (Array.isArray(item.valueE)) {
item.valueE = [];
} else if (typeof item.valueE === "number") {
item.valueE = "";
} else if (typeof item.valueE === "boolean") {
} else {
item.valueE = "";
}
}
}
function tableClose() { function tableClose() {
handleAddCallback(); handleAddCallback();
} }
@ -283,19 +265,6 @@ function handleSelectionChange(selection) {
table.value.selectRows = selection; table.value.selectRows = selection;
} }
function searchReload() {
for (let name in table.value.column) {
if (
!table.value.column[name].search ||
table.value.column[name].value === undefined ||
table.value.column[name].value === null ||
table.value.column[name].value === ""
) {
continue;
}
table.value.column[name].value = "";
}
}
// //
function handleReloadPaged(reload = true) { function handleReloadPaged(reload = true) {
if (table.value.search === undefined || table.value.search.PageIndex === undefined) { if (table.value.search === undefined || table.value.search.PageIndex === undefined) {
@ -460,8 +429,6 @@ function fetchPagedData() {
<el-button type="primary" :icon="Search" @click="handleReloadPaged(false)" <el-button type="primary" :icon="Search" @click="handleReloadPaged(false)"
>查询</el-button >查询</el-button
> >
<el-button type="default" @click="searchReload()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -21,14 +21,6 @@ export const ruleRequiredI = (max: number = 20, min: number = 0): Rule[] => {
res.push({ min: min, message: `长度不能小于${min}`, trigger: "blur" }); res.push({ min: min, message: `长度不能小于${min}`, trigger: "blur" });
return res; return res;
}; };
export const ruleNumber = [
{
pattern: /^\d*\.?\d+$/,
message: "请输入正确数字",
trigger: "blur"
}
];
export const ruleRequiredNumber = [ export const ruleRequiredNumber = [
{ required: true, message: "不能为空", trigger: "blur" }, { required: true, message: "不能为空", trigger: "blur" },
{ {

View File

@ -43,6 +43,13 @@ const tableData: TableConfig = {
}, },
operationColumn: true, // operationColumn: true, //
operationColumnData: [ operationColumnData: [
{
//
topBtn: true, //
label: "添加",
btnStyle: "success",
btnType: "custom",
},
{ {
topBtn: false, // topBtn: false, //
show: true, show: true,
@ -84,6 +91,7 @@ const tableData: TableConfig = {
grade: { grade: {
label: "年级", label: "年级",
width: "100px", width: "100px",
custom: (s) => `${s.gradeYear}${s.gradeLevel}`,
search: true, search: true,
add: false, // add: false, //
edit: false, // edit: false, //
@ -113,7 +121,7 @@ const tableData: TableConfig = {
createTime: { createTime: {
label: "录入时间", label: "录入时间",
width: "200px", width: "200px",
search: false, search: true,
add: false, // add: false, //
edit: false, // edit: false, //
}, },

View File

@ -83,8 +83,8 @@ const tableData: TableConfig = {
grade: { grade: {
label: "年级", label: "年级",
search: true, search: true,
// type: "dropdown", type: "dropdown",
// setting: {}, setting: {},
width: "60px", width: "60px",
}, },
@ -148,11 +148,8 @@ const tableData: TableConfig = {
const showTable = ref(false); const showTable = ref(false);
onMounted(async () => { onMounted(async () => {
// //
// tableData.column.grade.setting.datasource = (await getenum("GradeEnum")).data.map(
// (x) => { tableData.column.grade.setting.datasource = (await getenum("GradeEnum")).data;
// return { text: x.text, value: x.text };
// }
// );
tableData.column.testPaperType.setting.datasource = ( tableData.column.testPaperType.setting.datasource = (
await getenum("TestPaperTypeEnum") await getenum("TestPaperTypeEnum")

View File

@ -5,7 +5,7 @@ import { onMounted, ref } from "vue";
import { fa } from "element-plus/es/locales.mjs"; import { fa } from "element-plus/es/locales.mjs";
import { hTableAPI } from "@/api/hTable"; import { hTableAPI } from "@/api/hTable";
import { getenum } from "@/api/enum"; import { getenum } from "@/api/enum";
import { ruleNumber, ruleRequired, ruleRequiredNumber } from "@/utils/rules"; import { ruleRequired, ruleRequiredNumber } from "@/utils/rules";
import { ImportExamInfo } from "@/api/exam"; import { ImportExamInfo } from "@/api/exam";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { entryExamInfo } from "./examFun"; import { entryExamInfo } from "./examFun";
@ -133,17 +133,19 @@ const tableData: TableConfig = {
}, },
scoreLine: { scoreLine: {
label: "划线分数", label: "划线分数",
rules: ruleNumber, rules: ruleRequiredNumber,
search: false, search: true,
width: "100px", width: "100px",
setting: {},
add: true, // add: true, //
edit: true, // edit: true, //
}, },
baseSchoolScore: { baseSchoolScore: {
label: "资源校平均分", label: "资源校平均分",
rules: ruleNumber, // rules: ruleRequiredNumber,
search: false, search: true,
width: "150px", width: "150px",
setting: {},
add: true, // add: true, //
edit: true, // edit: true, //
}, },
@ -160,7 +162,7 @@ const tableData: TableConfig = {
createTime: { createTime: {
label: "创建时间", label: "创建时间",
type: "datetime", type: "datetime",
search: false, search: true,
add: false, // add: false, //
edit: false, // edit: false, //
}, },

View File

@ -6,7 +6,11 @@
:label-width="eData.formLabelWidth" :label-width="eData.formLabelWidth"
clearable clearable
> >
<el-form-item label="学校名称:" prop="Name" :rules="eData.rules.Required"> <el-form-item
label="学校名称:"
prop="Name"
:rules="eData.rules.Required"
>
<el-input <el-input
@change="inputChange" @change="inputChange"
type="text" type="text"
@ -23,7 +27,7 @@
<el-select <el-select
v-model="eData.form.pid" v-model="eData.form.pid"
clearable clearable
@change="(v) => selectChange(v, 1)" @change="v => selectChange(v, 1)"
filterable filterable
placeholder="省份" placeholder="省份"
style="width: 180px" style="width: 180px"
@ -41,7 +45,7 @@
<el-select <el-select
v-model="eData.form.cid" v-model="eData.form.cid"
clearable clearable
@change="(v) => selectChange(v, 2)" @change="v => selectChange(v, 2)"
filterable filterable
placeholder="市" placeholder="市"
style="width: 180px" style="width: 180px"
@ -59,7 +63,7 @@
<el-select <el-select
v-model="eData.form.rid" v-model="eData.form.rid"
clearable clearable
@change="(v) => selectChange(v, 3)" @change="v => selectChange(v, 3)"
filterable filterable
placeholder="区" placeholder="区"
style="width: 180px" style="width: 180px"
@ -78,14 +82,21 @@
</el-form-item> </el-form-item>
<el-form-item label="启用:" prop="Enable"> <el-form-item label="启用:" prop="Enable">
<el-switch v-model="eData.form.Enable" active-text="启用" inactive-text="禁用"> <el-switch
v-model="eData.form.Enable"
active-text="启用"
inactive-text="禁用"
>
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<div style="padding-left: 4rem"> <div style="padding-left: 4rem">
<br /> <br />
</div> </div>
<el-form-item> <el-form-item>
<el-button type="primary" :loading="eData.loading" @click="handleSubmitForm()" <el-button
type="primary"
:loading="eData.loading"
@click="handleSubmitForm()"
>立即提交</el-button >立即提交</el-button
> >
<el-button @click="handleResetForm()">重置</el-button> <el-button @click="handleResetForm()">重置</el-button>
@ -102,12 +113,12 @@ import { onMounted, ref } from "vue";
const props = defineProps({ const props = defineProps({
id: { id: {
type: Number, type: Number,
default: -1, default: -1
}, },
row: { row: {
type: Object as PropType<any[]>, type: Object as PropType<any[]>,
default: null, default: null
}, }
}); });
const eData = ref({ const eData = ref({
@ -118,8 +129,8 @@ const eData = ref({
Required: { Required: {
required: true, required: true,
message: "必填项", message: "必填项",
trigger: "blur", trigger: "blur"
}, }
}, },
formLabelWidth: "120px", formLabelWidth: "120px",
size: "small", size: "small",
@ -133,8 +144,8 @@ const eData = ref({
pname: "", pname: "",
cname: "", cname: "",
rname: "", rname: "",
Enable: true, Enable: true
}, }
}); });
onMounted(() => { onMounted(() => {
fetchInitData(); fetchInitData();
@ -148,7 +159,7 @@ async function selectChange(value, index) {
let loc = eData.value.LocaArr2; let loc = eData.value.LocaArr2;
if (index == 1) { if (index == 1) {
eData.value.form.pname = eData.value.form.pname =
value == "" ? "" : eData.value.LocaArr1.find((s) => s.Value == value).Text; value == "" ? "" : eData.value.LocaArr1.find(s => s.Value == value).Text;
eData.value.form.cname = ""; eData.value.form.cname = "";
eData.value.form.rname = ""; eData.value.form.rname = "";
eData.value.form.cid = ""; eData.value.form.cid = "";
@ -157,34 +168,40 @@ async function selectChange(value, index) {
loc = eData.value.LocaArr3; loc = eData.value.LocaArr3;
GetInfo = getregion; GetInfo = getregion;
eData.value.form.cname = eData.value.form.cname =
value == "" ? "" : eData.value.LocaArr2.find((s) => s.Value == value).Text; value == "" ? "" : eData.value.LocaArr2.find(s => s.Value == value).Text;
eData.value.form.rname = ""; eData.value.form.rname = "";
eData.value.form.rid = ""; eData.value.form.rid = "";
} else { } else {
eData.value.form.rname = eData.value.form.rname =
value == "" ? "" : eData.value.LocaArr3.find((s) => s.Value == value).Text; value == "" ? "" : eData.value.LocaArr3.find(s => s.Value == value).Text;
} }
if (value == "" && index == 3) return; if (value == "" && index == 3) return;
let nodes = (await GetInfo(nid)).data.map((item) => ({ let nodes = (await GetInfo(nid)).data.map(item => ({
Value: item.rid || item.cid || item.pid, Value: item.rid || item.cid || item.pid,
Text: item.rname || item.cname || item.pname, Text: item.rname || item.cname || item.pname
})); }));
loc.splice(0, loc.length); loc.splice(0, loc.length);
loc.push(...nodes); loc.push(...nodes);
} }
async function inputChange() { async function inputChange() {
if (eData.value.form.pname == "") { if (eData.value.form.pname == "") {
let p = eData.value.LocaArr1.find((s) => eData.value.form.Name.includes(s.Text)); let p = eData.value.LocaArr1.find(s =>
eData.value.form.Name.includes(s.Text)
);
if (!p) return; if (!p) return;
eData.value.form.pid = p.Value; eData.value.form.pid = p.Value;
await selectChange(eData.value.form.pid, 1); await selectChange(eData.value.form.pid, 1);
let p1 = eData.value.LocaArr2.find((s) => eData.value.form.Name.includes(s.Text)); let p1 = eData.value.LocaArr2.find(s =>
eData.value.form.Name.includes(s.Text)
);
if (!p1) return; if (!p1) return;
eData.value.form.cid = p1.Value; eData.value.form.cid = p1.Value;
await selectChange(eData.value.form.cid, 2); await selectChange(eData.value.form.cid, 2);
let p2 = eData.value.LocaArr3.find((s) => eData.value.form.Name.includes(s.Text)); let p2 = eData.value.LocaArr3.find(s =>
eData.value.form.Name.includes(s.Text)
);
if (!p2) return; if (!p2) return;
eData.value.form.rid = p2.Value; eData.value.form.rid = p2.Value;
await selectChange(eData.value.form.rid, 3); await selectChange(eData.value.form.rid, 3);
@ -197,17 +214,18 @@ function handlePagedCallback() {
} }
const schoolAddForm = ref<FormInstance>(); const schoolAddForm = ref<FormInstance>();
function handleSubmitForm() { function handleSubmitForm() {
schoolAddForm.value.validate((valid) => { schoolAddForm.value.validate(valid => {
if (valid) { if (valid) {
eData.value.loading = true; eData.value.loading = true;
let ids = ["pid", "cid", "rid"]; let ids = ["pid", "cid", "rid"];
for (const key of ids) { for (const key of ids) {
eData.value.form[key] = eData.value.form[key] == "" ? 0 : eData.value.form[key]; eData.value.form[key] =
eData.value.form[key] == "" ? 0 : eData.value.form[key];
} }
if (!(props.id !== -1)) { if (!(props.id !== -1)) {
eData.value.form.id = 0; eData.value.form.id = 0;
} }
EditSchool(eData.value.form).then((res) => { EditSchool(eData.value.form).then(res => {
eData.value.loading = false; eData.value.loading = false;
if (res.code === 200) { if (res.code === 200) {
ElMessage.success("操作成功"); ElMessage.success("操作成功");
@ -219,19 +237,11 @@ function handleSubmitForm() {
} }
}); });
} }
function handleResetForm() { function handleResetForm() {}
schoolAddForm.value.resetFields();
eData.value.form.pid = "";
eData.value.form.cid = "";
eData.value.form.rid = "";
eData.value.form.pname = "";
eData.value.form.cname = "";
eData.value.form.rname = "";
}
async function fetchInitData() { async function fetchInitData() {
eData.value.LocaArr1 = (await getProvince()).data.map((item) => ({ eData.value.LocaArr1 = (await getProvince()).data.map(item => ({
Value: item.rid || item.cid || item.pid, Value: item.rid || item.cid || item.pid,
Text: item.rname || item.cname || item.pname, Text: item.rname || item.cname || item.pname
})); }));
} }

View File

@ -8,9 +8,7 @@ defineOptions({
}); });
onMounted(() => {}); onMounted(() => {});
function searchCallback(data) { function searchCallback(data) {}
//let c = data.Conditions.find((s) => s.FieldName == "Pname");
}
const table = ref<{ initTable: (config: TableConfig) => void }>(null); const table = ref<{ initTable: (config: TableConfig) => void }>(null);
const tableData: TableConfig = { const tableData: TableConfig = {
apiUrl: "usercenter/back/schools", apiUrl: "usercenter/back/schools",
@ -65,10 +63,10 @@ const tableData: TableConfig = {
add: true, // add: true, //
edit: true, // edit: true, //
}, },
pname: { loc: {
label: "地区", label: "地区",
width: "300px", width: "300px",
search: false, search: true,
custom: (row) => `${row.pname}-${row.cname}-${row.rname}`, custom: (row) => `${row.pname}-${row.cname}-${row.rname}`,
add: false, // add: false, //
edit: false, // edit: false, //

View File

@ -88,8 +88,6 @@
<el-button type="primary" @click="handleReloadPaged" :icon="Search" <el-button type="primary" @click="handleReloadPaged" :icon="Search"
>查询</el-button >查询</el-button
> >
<el-button type="default" @click="searchReload">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -551,11 +549,6 @@ const handleSelectionChange = (selection: UserDetail[]) => {
table.selectRows = selection; table.selectRows = selection;
}; };
function searchReload() {
for (const key in search) {
search[key] = "";
}
}
const handleDelete = () => { const handleDelete = () => {
// if (table.selectRows.length === 0) { // if (table.selectRows.length === 0) {
// ElMessage.warning(""); // ElMessage.warning("");

View File

@ -2,7 +2,7 @@
<div class="app-container" style="padding: 5px"> <div class="app-container" style="padding: 5px">
<div class="search-container" style="padding-top: 5px"> <div class="search-container" style="padding-top: 5px">
<!-- 搜索项目 --> <!-- 搜索项目 -->
<el-form ref="searchForm" :inline="true" :model="search"> <el-form :inline="true" :model="search">
<el-form-item> <el-form-item>
<el-input v-model="search.searchStr" placeholder="姓名/账号/学号" /> <el-input v-model="search.searchStr" placeholder="姓名/账号/学号" />
</el-form-item> </el-form-item>
@ -100,7 +100,6 @@
<el-button type="primary" @click="handleReloadPaged" :icon="Search" <el-button type="primary" @click="handleReloadPaged" :icon="Search"
>查询</el-button >查询</el-button
> >
<el-button type="default" @click="searchReload">重置</el-button>
</el-form-item> </el-form-item>
<el-form-item v-show="selectUser"> <el-form-item v-show="selectUser">
<el-button type="success" @click="selectUserCallBack()" icon="el-icon-check" <el-button type="success" @click="selectUserCallBack()" icon="el-icon-check"
@ -237,7 +236,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted } from "vue"; import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import type { FormInstance, UploadProps } from "element-plus"; import type { UploadProps } from "element-plus";
import UserForm from "./edit.vue"; import UserForm from "./edit.vue";
import { import {
@ -348,7 +347,6 @@ const baseUrl = import.meta.env.VITE_API_USERCENTER_URL;
const excelImportUsersUrl = `${baseUrl}/back/users/downloadimportusersexceltemplate`; const excelImportUsersUrl = `${baseUrl}/back/users/downloadimportusersexceltemplate`;
const excelImportMeetingUrl = `${baseUrl}/back/users/downloadimportmeetingexceltemplate`; const excelImportMeetingUrl = `${baseUrl}/back/users/downloadimportmeetingexceltemplate`;
const excelImportOrdersUrl = `${baseUrl}/back/users/downloadimportordersexceltemplate`; const excelImportOrdersUrl = `${baseUrl}/back/users/downloadimportordersexceltemplate`;
const searchForm = ref<FormInstance>();
const editId = ref(0); const editId = ref(0);
const showAllPosition = ref<UserDetail[]>([]); const showAllPosition = ref<UserDetail[]>([]);
@ -620,11 +618,6 @@ const PositionsSort = (arr: Position[]) => {
return arr; return arr;
}; };
function searchReload() {
for (const key in search) {
search[key] = "";
}
}
const handleReloadPaged = (event?: any, searchUnUse?: boolean) => { const handleReloadPaged = (event?: any, searchUnUse?: boolean) => {
pagination.index = 1; pagination.index = 1;
table.selectRows = []; table.selectRows = [];

View File

@ -157,7 +157,7 @@
" "
> >
<div style="font-weight: bold; color: #409eff"> <div style="font-weight: bold; color: #409eff">
执行记录{{ index + 1 }}{{ record.operator }} {{ record.time }} 执行记录{{ index + 1 }}{{ record.time }}
</div> </div>
<div style="margin-top: 5px; white-space: pre-wrap"> <div style="margin-top: 5px; white-space: pre-wrap">
{{ record.content }} {{ record.content }}
@ -209,8 +209,6 @@
v-model="operationForm.operationContent" v-model="operationForm.operationContent"
type="textarea" type="textarea"
:rows="4" :rows="4"
maxlength="300"
show-word-limit
:placeholder="`请输入${operationContentLabel}`" :placeholder="`请输入${operationContentLabel}`"
/> />
</el-form-item> </el-form-item>
@ -232,8 +230,6 @@ import { ElMessage } from "element-plus";
import { getSchoolData } from "@/api/userCenter"; import { getSchoolData } from "@/api/userCenter";
import { getSchoolBusinessPeopleListApi, addOrEditApi } from "@/api/toschoolinfomanage"; import { getSchoolBusinessPeopleListApi, addOrEditApi } from "@/api/toschoolinfomanage";
import { setFips } from "crypto"; import { setFips } from "crypto";
import { useUserStoreHook } from "@/store/modules/user";
import { isAllEmpty } from "@pureadmin/utils";
const activeName = ref<any>(0); const activeName = ref<any>(0);
@ -262,9 +258,7 @@ const operationForm = reactive({
const operationFormRef = ref<FormInstance>(); const operationFormRef = ref<FormInstance>();
// //
const executionRecords = ref<Array<{ time: string; content: string; operator?: string }>>( const executionRecords = ref<Array<{ time: string; content: string }>>([]);
[]
);
const finishRecord = ref<{ time: string; content: string } | null>(null); const finishRecord = ref<{ time: string; content: string } | null>(null);
// detailData.solutionRecord // detailData.solutionRecord
@ -277,7 +271,6 @@ watch(
executionRecords.value = recs.map((r: any) => ({ executionRecords.value = recs.map((r: any) => ({
time: r?.executionTimeStr || r?.executionTime || "", time: r?.executionTimeStr || r?.executionTime || "",
content: r?.executionRecords || "", content: r?.executionRecords || "",
operator: r?.operator || "",
})); }));
// //
if (sr?.endRecordTime || sr?.endRecord) { if (sr?.endRecordTime || sr?.endRecord) {
@ -450,15 +443,9 @@ const confirmOperation = async () => {
if (!props.detailData.solutionRecord) props.detailData.solutionRecord = {} as any; if (!props.detailData.solutionRecord) props.detailData.solutionRecord = {} as any;
if (!Array.isArray(props.detailData.solutionRecord.record)) if (!Array.isArray(props.detailData.solutionRecord.record))
props.detailData.solutionRecord.record = []; props.detailData.solutionRecord.record = [];
const userName = computed(() => {
return isAllEmpty(useUserStoreHook()?.nickName)
? useUserStoreHook()?.userName
: useUserStoreHook()?.nickName;
});
props.detailData.solutionRecord.record.push({ props.detailData.solutionRecord.record.push({
executionTime: operationTime, executionTime: operationTime,
executionRecords: operationContent, executionRecords: operationContent,
operator: userName.value,
}); });
break; break;
case "addFinish": case "addFinish":