|
@@ -73,7 +73,8 @@ import {
|
|
|
FormInst,
|
|
|
FormItemInst,
|
|
|
FormItemRule,
|
|
|
- FormRules
|
|
|
+ FormRules,
|
|
|
+ messageDark
|
|
|
} from 'naive-ui'
|
|
|
import { FlashOutline } from '@vicons/ionicons5'
|
|
|
import { h, defineComponent, ref, onMounted } from 'vue'
|
|
@@ -257,20 +258,7 @@ let SelectConditionParams = {
|
|
|
createUid: "",
|
|
|
disabled: "",
|
|
|
}
|
|
|
-async function changeInput(e: any) {
|
|
|
- // console.log(e);
|
|
|
- SelectConditionParams.name = e;
|
|
|
- selectCondition(1, 10, SelectConditionParams).then(r => {
|
|
|
- console.log(r.data);
|
|
|
-
|
|
|
- tableData.value = r.data;
|
|
|
- console.log(tableData.value);
|
|
|
|
|
|
- // getTableData();
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
@@ -291,7 +279,7 @@ export default defineComponent({
|
|
|
const modelRef = ref({
|
|
|
name: null,
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
const rules: FormRules = {
|
|
|
name: [
|
|
|
{
|
|
@@ -318,6 +306,27 @@ export default defineComponent({
|
|
|
message.success('更新成功');
|
|
|
showModalUpdate.value = !showModalUpdate;
|
|
|
}
|
|
|
+ async function changeInput(e: any) {
|
|
|
+ // console.log(e);
|
|
|
+ SelectConditionParams.name = e;
|
|
|
+ selectCondition(1, 10, SelectConditionParams).then(r => {
|
|
|
+
|
|
|
+ // tableData.value = r.data;
|
|
|
+ for (let i = 0; i < r.data.length; i++) {
|
|
|
+ // console.log(tableData.value[i]);
|
|
|
+ Object.assign(r.data[i], { tags: ['删除', '更新'] });
|
|
|
+ }
|
|
|
+ console.log(r.data);
|
|
|
+ if (r.data.length > 0&&e!="")
|
|
|
+ message.success("查询成功")
|
|
|
+ else if(r.data.length == 0&&e!="") message.error("班级不存在,请输入其他班级")
|
|
|
+ // console.log(tableData.value);
|
|
|
+ tableData.value = r.data;
|
|
|
+ // getTableData();
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
return {
|
|
|
tableData,
|
|
|
changeInput,
|