staging #23
|
|
@ -8,20 +8,20 @@ const props = defineProps({
|
|||
//** 传入的表单数据 */
|
||||
id: {
|
||||
type: Number,
|
||||
default: -1
|
||||
default: -1,
|
||||
},
|
||||
tableData: {
|
||||
type: Object as PropType<TableConfig>,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
row: {
|
||||
type: Object,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
tagData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["handlePagedCallback"]);
|
||||
const editFormRef = ref<FormInstance>();
|
||||
|
|
@ -34,12 +34,12 @@ const editData = ref({
|
|||
{
|
||||
required: true,
|
||||
message: "不能为空",
|
||||
trigger: "blur"
|
||||
}
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
formLabelWidth: "120px",
|
||||
size: "small",
|
||||
loading: false
|
||||
loading: false,
|
||||
});
|
||||
const Api = new hTableAPI(editData.value.table.apiUrl);
|
||||
onMounted(() => {
|
||||
|
|
@ -69,7 +69,7 @@ function handlePagedCallback() {
|
|||
emit("handlePagedCallback"); // 传参给父组件
|
||||
}
|
||||
function handleSubmitForm() {
|
||||
editFormRef.value.validate(valid => {
|
||||
editFormRef.value.validate((valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ function handleSubmitForm() {
|
|||
if (editData.value.table.editCallback) {
|
||||
editData.value.table.editCallback(form);
|
||||
}
|
||||
Api.edit(form).then(res => {
|
||||
Api.edit(form).then((res) => {
|
||||
editData.value.loading = false;
|
||||
if (res.code === 200) {
|
||||
ElMessage.success("操作成功");
|
||||
|
|
@ -105,7 +105,7 @@ function handleResetForm() {
|
|||
if (Array.isArray(item.valueE)) {
|
||||
item.valueE = [];
|
||||
} else if (typeof item.valueE === "number") {
|
||||
item.valueE = 0;
|
||||
item.valueE = "";
|
||||
} else if (typeof item.valueE === "boolean") {
|
||||
item.valueE = false;
|
||||
} else {
|
||||
|
|
@ -118,7 +118,7 @@ function fetchFormData() {
|
|||
editData.value.loading = false;
|
||||
if (editData.value.isedit) {
|
||||
handleResetForm();
|
||||
Api.Info(props.id).then(res => {
|
||||
Api.Info(props.id).then((res) => {
|
||||
if (res.code === 200) {
|
||||
editData.value.frorm = res.data;
|
||||
for (const key in column.value) {
|
||||
|
|
@ -201,19 +201,12 @@ function fetchFormData() {
|
|||
/>
|
||||
</div>
|
||||
<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>
|
||||
</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 @click="handleResetForm()">重置</el-button>
|
||||
|
|
|
|||
|
|
@ -185,6 +185,9 @@ function handleAdd() {
|
|||
dialog.value.edit.visible = true;
|
||||
dialog.value.visible = true;
|
||||
dialog.value.width = "500px";
|
||||
|
||||
dialog.value.edit.row = null;
|
||||
dialog.value.edit.tagData = null;
|
||||
}
|
||||
function handleEdit(obj, row) {
|
||||
dialog.value.edit.id = row[0].id;
|
||||
|
|
@ -246,8 +249,23 @@ function handleAddCallback() {
|
|||
dialog.value.visible = false;
|
||||
dialog.value.edit.visible = false;
|
||||
dialog.value.custom.visible = false;
|
||||
|
||||
handleResetForm();
|
||||
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() {
|
||||
handleAddCallback();
|
||||
}
|
||||
|
|
@ -265,6 +283,19 @@ function handleSelectionChange(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) {
|
||||
if (table.value.search === undefined || table.value.search.PageIndex === undefined) {
|
||||
|
|
@ -429,6 +460,8 @@ function fetchPagedData() {
|
|||
<el-button type="primary" :icon="Search" @click="handleReloadPaged(false)"
|
||||
>查询</el-button
|
||||
>
|
||||
|
||||
<el-button type="default" @click="searchReload()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,14 @@ export const ruleRequiredI = (max: number = 20, min: number = 0): Rule[] => {
|
|||
res.push({ min: min, message: `长度不能小于${min}`, trigger: "blur" });
|
||||
return res;
|
||||
};
|
||||
|
||||
export const ruleNumber = [
|
||||
{
|
||||
pattern: /^\d*\.?\d+$/,
|
||||
message: "请输入正确数字",
|
||||
trigger: "blur"
|
||||
}
|
||||
];
|
||||
export const ruleRequiredNumber = [
|
||||
{ required: true, message: "不能为空", trigger: "blur" },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,13 +43,6 @@ const tableData: TableConfig = {
|
|||
},
|
||||
operationColumn: true, // 显示操作按钮
|
||||
operationColumnData: [
|
||||
{
|
||||
// 操作按钮
|
||||
topBtn: true, // 是头部按钮
|
||||
label: "添加",
|
||||
btnStyle: "success",
|
||||
btnType: "custom",
|
||||
},
|
||||
{
|
||||
topBtn: false, // 头部按钮
|
||||
show: true,
|
||||
|
|
@ -91,7 +84,6 @@ const tableData: TableConfig = {
|
|||
grade: {
|
||||
label: "年级",
|
||||
width: "100px",
|
||||
custom: (s) => `${s.gradeYear}${s.gradeLevel}`,
|
||||
search: true,
|
||||
add: false, // 字段允许添加
|
||||
edit: false, // 字段允许修改
|
||||
|
|
@ -121,7 +113,7 @@ const tableData: TableConfig = {
|
|||
createTime: {
|
||||
label: "录入时间",
|
||||
width: "200px",
|
||||
search: true,
|
||||
search: false,
|
||||
add: false, // 字段允许添加
|
||||
edit: false, // 字段允许修改
|
||||
},
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ const tableData: TableConfig = {
|
|||
grade: {
|
||||
label: "年级",
|
||||
search: true,
|
||||
type: "dropdown",
|
||||
setting: {},
|
||||
// type: "dropdown",
|
||||
// setting: {},
|
||||
width: "60px",
|
||||
},
|
||||
|
||||
|
|
@ -148,8 +148,11 @@ const tableData: TableConfig = {
|
|||
const showTable = ref(false);
|
||||
onMounted(async () => {
|
||||
//初始化数据原
|
||||
|
||||
tableData.column.grade.setting.datasource = (await getenum("GradeEnum")).data;
|
||||
// tableData.column.grade.setting.datasource = (await getenum("GradeEnum")).data.map(
|
||||
// (x) => {
|
||||
// return { text: x.text, value: x.text };
|
||||
// }
|
||||
// );
|
||||
|
||||
tableData.column.testPaperType.setting.datasource = (
|
||||
await getenum("TestPaperTypeEnum")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { onMounted, ref } from "vue";
|
|||
import { fa } from "element-plus/es/locales.mjs";
|
||||
import { hTableAPI } from "@/api/hTable";
|
||||
import { getenum } from "@/api/enum";
|
||||
import { ruleRequired, ruleRequiredNumber } from "@/utils/rules";
|
||||
import { ruleNumber, ruleRequired, ruleRequiredNumber } from "@/utils/rules";
|
||||
import { ImportExamInfo } from "@/api/exam";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { entryExamInfo } from "./examFun";
|
||||
|
|
@ -133,19 +133,17 @@ const tableData: TableConfig = {
|
|||
},
|
||||
scoreLine: {
|
||||
label: "划线分数",
|
||||
rules: ruleRequiredNumber,
|
||||
search: true,
|
||||
rules: ruleNumber,
|
||||
search: false,
|
||||
width: "100px",
|
||||
setting: {},
|
||||
add: true, // 字段允许添加
|
||||
edit: true, // 字段允许修改
|
||||
},
|
||||
baseSchoolScore: {
|
||||
label: "资源校平均分",
|
||||
// rules: ruleRequiredNumber,
|
||||
search: true,
|
||||
rules: ruleNumber,
|
||||
search: false,
|
||||
width: "150px",
|
||||
setting: {},
|
||||
add: true, // 字段允许添加
|
||||
edit: true, // 字段允许修改
|
||||
},
|
||||
|
|
@ -162,7 +160,7 @@ const tableData: TableConfig = {
|
|||
createTime: {
|
||||
label: "创建时间",
|
||||
type: "datetime",
|
||||
search: true,
|
||||
search: false,
|
||||
add: false, // 字段允许添加
|
||||
edit: false, // 字段允许修改
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@
|
|||
:label-width="eData.formLabelWidth"
|
||||
clearable
|
||||
>
|
||||
<el-form-item
|
||||
label="学校名称:"
|
||||
prop="Name"
|
||||
:rules="eData.rules.Required"
|
||||
>
|
||||
<el-form-item label="学校名称:" prop="Name" :rules="eData.rules.Required">
|
||||
<el-input
|
||||
@change="inputChange"
|
||||
type="text"
|
||||
|
|
@ -27,7 +23,7 @@
|
|||
<el-select
|
||||
v-model="eData.form.pid"
|
||||
clearable
|
||||
@change="v => selectChange(v, 1)"
|
||||
@change="(v) => selectChange(v, 1)"
|
||||
filterable
|
||||
placeholder="省份"
|
||||
style="width: 180px"
|
||||
|
|
@ -45,7 +41,7 @@
|
|||
<el-select
|
||||
v-model="eData.form.cid"
|
||||
clearable
|
||||
@change="v => selectChange(v, 2)"
|
||||
@change="(v) => selectChange(v, 2)"
|
||||
filterable
|
||||
placeholder="市"
|
||||
style="width: 180px"
|
||||
|
|
@ -63,7 +59,7 @@
|
|||
<el-select
|
||||
v-model="eData.form.rid"
|
||||
clearable
|
||||
@change="v => selectChange(v, 3)"
|
||||
@change="(v) => selectChange(v, 3)"
|
||||
filterable
|
||||
placeholder="区"
|
||||
style="width: 180px"
|
||||
|
|
@ -82,21 +78,14 @@
|
|||
</el-form-item>
|
||||
|
||||
<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-form-item>
|
||||
<div style="padding-left: 4rem">
|
||||
<br />
|
||||
</div>
|
||||
<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 @click="handleResetForm()">重置</el-button>
|
||||
|
|
@ -113,12 +102,12 @@ import { onMounted, ref } from "vue";
|
|||
const props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: -1
|
||||
default: -1,
|
||||
},
|
||||
row: {
|
||||
type: Object as PropType<any[]>,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const eData = ref({
|
||||
|
|
@ -129,8 +118,8 @@ const eData = ref({
|
|||
Required: {
|
||||
required: true,
|
||||
message: "必填项",
|
||||
trigger: "blur"
|
||||
}
|
||||
trigger: "blur",
|
||||
},
|
||||
},
|
||||
formLabelWidth: "120px",
|
||||
size: "small",
|
||||
|
|
@ -144,8 +133,8 @@ const eData = ref({
|
|||
pname: "",
|
||||
cname: "",
|
||||
rname: "",
|
||||
Enable: true
|
||||
}
|
||||
Enable: true,
|
||||
},
|
||||
});
|
||||
onMounted(() => {
|
||||
fetchInitData();
|
||||
|
|
@ -159,7 +148,7 @@ async function selectChange(value, index) {
|
|||
let loc = eData.value.LocaArr2;
|
||||
if (index == 1) {
|
||||
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.rname = "";
|
||||
eData.value.form.cid = "";
|
||||
|
|
@ -168,40 +157,34 @@ async function selectChange(value, index) {
|
|||
loc = eData.value.LocaArr3;
|
||||
GetInfo = getregion;
|
||||
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.rid = "";
|
||||
} else {
|
||||
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;
|
||||
let nodes = (await GetInfo(nid)).data.map(item => ({
|
||||
let nodes = (await GetInfo(nid)).data.map((item) => ({
|
||||
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.push(...nodes);
|
||||
}
|
||||
async function inputChange() {
|
||||
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;
|
||||
eData.value.form.pid = p.Value;
|
||||
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;
|
||||
eData.value.form.cid = p1.Value;
|
||||
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;
|
||||
eData.value.form.rid = p2.Value;
|
||||
await selectChange(eData.value.form.rid, 3);
|
||||
|
|
@ -214,18 +197,17 @@ function handlePagedCallback() {
|
|||
}
|
||||
const schoolAddForm = ref<FormInstance>();
|
||||
function handleSubmitForm() {
|
||||
schoolAddForm.value.validate(valid => {
|
||||
schoolAddForm.value.validate((valid) => {
|
||||
if (valid) {
|
||||
eData.value.loading = true;
|
||||
let ids = ["pid", "cid", "rid"];
|
||||
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)) {
|
||||
eData.value.form.id = 0;
|
||||
}
|
||||
EditSchool(eData.value.form).then(res => {
|
||||
EditSchool(eData.value.form).then((res) => {
|
||||
eData.value.loading = false;
|
||||
if (res.code === 200) {
|
||||
ElMessage.success("操作成功");
|
||||
|
|
@ -237,11 +219,19 @@ 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() {
|
||||
eData.value.LocaArr1 = (await getProvince()).data.map(item => ({
|
||||
eData.value.LocaArr1 = (await getProvince()).data.map((item) => ({
|
||||
Value: item.rid || item.cid || item.pid,
|
||||
Text: item.rname || item.cname || item.pname
|
||||
Text: item.rname || item.cname || item.pname,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ defineOptions({
|
|||
});
|
||||
|
||||
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 tableData: TableConfig = {
|
||||
apiUrl: "usercenter/back/schools",
|
||||
|
|
@ -63,10 +65,10 @@ const tableData: TableConfig = {
|
|||
add: true, // 字段允许添加
|
||||
edit: true, // 字段允许修改
|
||||
},
|
||||
loc: {
|
||||
pname: {
|
||||
label: "地区",
|
||||
width: "300px",
|
||||
search: true,
|
||||
search: false,
|
||||
custom: (row) => `${row.pname}-${row.cname}-${row.rname}`,
|
||||
add: false, // 字段允许添加
|
||||
edit: false, // 字段允许修改
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@
|
|||
<el-button type="primary" @click="handleReloadPaged" :icon="Search"
|
||||
>查询</el-button
|
||||
>
|
||||
|
||||
<el-button type="default" @click="searchReload">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -549,6 +551,11 @@ const handleSelectionChange = (selection: UserDetail[]) => {
|
|||
table.selectRows = selection;
|
||||
};
|
||||
|
||||
function searchReload() {
|
||||
for (const key in search) {
|
||||
search[key] = "";
|
||||
}
|
||||
}
|
||||
const handleDelete = () => {
|
||||
// if (table.selectRows.length === 0) {
|
||||
// ElMessage.warning("未勾选记录");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container" style="padding: 5px">
|
||||
<div class="search-container" style="padding-top: 5px">
|
||||
<!-- 搜索项目 -->
|
||||
<el-form :inline="true" :model="search">
|
||||
<el-form ref="searchForm" :inline="true" :model="search">
|
||||
<el-form-item>
|
||||
<el-input v-model="search.searchStr" placeholder="姓名/账号/学号" />
|
||||
</el-form-item>
|
||||
|
|
@ -100,6 +100,7 @@
|
|||
<el-button type="primary" @click="handleReloadPaged" :icon="Search"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="default" @click="searchReload">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="selectUser">
|
||||
<el-button type="success" @click="selectUserCallBack()" icon="el-icon-check"
|
||||
|
|
@ -236,7 +237,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import type { UploadProps } from "element-plus";
|
||||
import type { FormInstance, UploadProps } from "element-plus";
|
||||
import UserForm from "./edit.vue";
|
||||
|
||||
import {
|
||||
|
|
@ -347,6 +348,7 @@ const baseUrl = import.meta.env.VITE_API_USERCENTER_URL;
|
|||
const excelImportUsersUrl = `${baseUrl}/back/users/downloadimportusersexceltemplate`;
|
||||
const excelImportMeetingUrl = `${baseUrl}/back/users/downloadimportmeetingexceltemplate`;
|
||||
const excelImportOrdersUrl = `${baseUrl}/back/users/downloadimportordersexceltemplate`;
|
||||
const searchForm = ref<FormInstance>();
|
||||
|
||||
const editId = ref(0);
|
||||
const showAllPosition = ref<UserDetail[]>([]);
|
||||
|
|
@ -618,6 +620,11 @@ const PositionsSort = (arr: Position[]) => {
|
|||
return arr;
|
||||
};
|
||||
|
||||
function searchReload() {
|
||||
for (const key in search) {
|
||||
search[key] = "";
|
||||
}
|
||||
}
|
||||
const handleReloadPaged = (event?: any, searchUnUse?: boolean) => {
|
||||
pagination.index = 1;
|
||||
table.selectRows = [];
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
"
|
||||
>
|
||||
<div style="font-weight: bold; color: #409eff">
|
||||
执行记录{{ index + 1 }}:{{ record.time }}
|
||||
执行记录{{ index + 1 }}:{{ record.operator }} {{ record.time }}
|
||||
</div>
|
||||
<div style="margin-top: 5px; white-space: pre-wrap">
|
||||
{{ record.content }}
|
||||
|
|
@ -209,6 +209,8 @@
|
|||
v-model="operationForm.operationContent"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
maxlength="300"
|
||||
show-word-limit
|
||||
:placeholder="`请输入${operationContentLabel}`"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -230,6 +232,8 @@ import { ElMessage } from "element-plus";
|
|||
import { getSchoolData } from "@/api/userCenter";
|
||||
import { getSchoolBusinessPeopleListApi, addOrEditApi } from "@/api/toschoolinfomanage";
|
||||
import { setFips } from "crypto";
|
||||
import { useUserStoreHook } from "@/store/modules/user";
|
||||
import { isAllEmpty } from "@pureadmin/utils";
|
||||
|
||||
const activeName = ref<any>(0);
|
||||
|
||||
|
|
@ -258,7 +262,9 @@ const operationForm = reactive({
|
|||
const operationFormRef = ref<FormInstance>();
|
||||
|
||||
// 执行记录和完结情况数据
|
||||
const executionRecords = ref<Array<{ time: string; content: string }>>([]);
|
||||
const executionRecords = ref<Array<{ time: string; content: string; operator?: string }>>(
|
||||
[]
|
||||
);
|
||||
const finishRecord = ref<{ time: string; content: string } | null>(null);
|
||||
|
||||
// 从父级 detailData.solutionRecord 回显本地显示数据
|
||||
|
|
@ -271,6 +277,7 @@ watch(
|
|||
executionRecords.value = recs.map((r: any) => ({
|
||||
time: r?.executionTimeStr || r?.executionTime || "",
|
||||
content: r?.executionRecords || "",
|
||||
operator: r?.operator || "",
|
||||
}));
|
||||
// 完结情况回显
|
||||
if (sr?.endRecordTime || sr?.endRecord) {
|
||||
|
|
@ -443,9 +450,15 @@ const confirmOperation = async () => {
|
|||
if (!props.detailData.solutionRecord) props.detailData.solutionRecord = {} as any;
|
||||
if (!Array.isArray(props.detailData.solutionRecord.record))
|
||||
props.detailData.solutionRecord.record = [];
|
||||
const userName = computed(() => {
|
||||
return isAllEmpty(useUserStoreHook()?.nickName)
|
||||
? useUserStoreHook()?.userName
|
||||
: useUserStoreHook()?.nickName;
|
||||
});
|
||||
props.detailData.solutionRecord.record.push({
|
||||
executionTime: operationTime,
|
||||
executionRecords: operationContent,
|
||||
operator: userName.value,
|
||||
});
|
||||
break;
|
||||
case "addFinish":
|
||||
|
|
|
|||
Loading…
Reference in New Issue