|
@@ -5,7 +5,6 @@ import {user} from "~/store";
|
|
|
import {useRouter} from "vue-router";
|
|
|
|
|
|
const router = useRouter();
|
|
|
-console.log(router, 7)
|
|
|
const route = useRoute();
|
|
|
const linkTo = (obj) => {
|
|
|
router.push(obj);
|
|
@@ -121,7 +120,29 @@ function editTeacher(item) {
|
|
|
}
|
|
|
dialogVisible = true;
|
|
|
}
|
|
|
+function del_teacher(item) {
|
|
|
+ ElMessageBox.confirm("确认删除该教研员?", "", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
|
|
|
+ request({
|
|
|
+ url: "/yzy/jyy/delete",
|
|
|
+ data: {
|
|
|
+ yj_id:item.yj_id
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === "1") {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ getListData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
function handleSubmit() {
|
|
|
let subject_ids = [];
|
|
|
let subject_names = [];
|
|
@@ -234,7 +255,7 @@ if (route.params.ykj_id) {
|
|
|
<td>{{ item.yj_subject_name }}</td>
|
|
|
<td>
|
|
|
<button type="button" class="op-btn edit" @click="editTeacher(item)">编辑</button>
|
|
|
- <button type="button" class="ml-15px op-btn del">删除</button>
|
|
|
+ <button type="button" class="ml-15px op-btn del" @click="del_teacher(item)">删除</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|