dbsd_kczx/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue

130 lines
4.8 KiB
Vue
Raw Normal View History

2024-05-06 15:15:47 +08:00
<template>
2024-05-13 09:03:02 +08:00
<div style="margin-top:10px;background:#fff;height:630px;overflow:auto;">
<a-card>
<div>
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学大纲</span>
<span style="width:300px;float: left;">
<span style="float:left;"><j-upload v-model:value="jxdgInfo.filePath"></j-upload></span>
</span>
<span style="float: right;"><a-button type="primary">提交</a-button><a-button type="primary" style="margin-left:10px;"></a-button></span>
</div>
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
<span style="float: left;">常见问题</span>
2024-05-13 16:29:57 +08:00
<span style="float: right;"><a-button type="primary" @click="addCjwtHanle">新增</a-button></span>
2024-05-13 09:03:02 +08:00
</div>
<a-row style="margin-top: 50px;width:100%;display: block;">
2024-05-13 16:29:57 +08:00
<a-col :span="24" v-for="(item,index) in cjwtSource" :key="index">
2024-05-13 09:03:02 +08:00
<a-row>
<a-col :span="24">
2024-05-13 16:29:57 +08:00
<span style="float: left;">{{index+1}}.{{item.question}}</span>
2024-05-13 09:03:02 +08:00
<span style="float: right;">
2024-05-13 16:29:57 +08:00
<a title="修改" @click="handleEdit(item)"><Icon icon="ant-design:form-outlined" /></a>
2024-05-13 09:03:02 +08:00
<a-divider type="vertical" style="height: 30px; background-color: #7cb305" />
2024-05-13 16:29:57 +08:00
<a title="删除" @click="handleDelete(item)"><Icon icon="ant-design:delete-outlined" /></a>
2024-05-13 09:03:02 +08:00
</span>
</a-col>
2024-05-13 16:29:57 +08:00
<a-col :span="24"><span><Icon icon="ant-design:caret-right-outlined" />{{item.answer}}</span></a-col>
2024-05-13 09:03:02 +08:00
<a-col :span="24">
<a-divider />
</a-col>
</a-row>
</a-col>
2024-05-13 16:29:57 +08:00
<a-col :span="24" v-show="cjwtSource.length>0">
2024-05-13 09:03:02 +08:00
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</a-col>
2024-05-13 16:29:57 +08:00
<a-col :span="24" v-show="cjwtSource.length==0">
2024-05-13 09:03:02 +08:00
<a-empty/>
</a-col>
</a-row>
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
<span style="float: left;">往届学生评价</span>
</div>
2024-05-13 16:29:57 +08:00
<studentPjjgTeaList :queryParam="{ pageSize: 3, ...tkzjParam,kcbh:'' }" style="max-height: 106px;"/>
2024-05-13 09:03:02 +08:00
</a-card>
2024-05-13 16:29:57 +08:00
<ZyCjwtModal ref="ZyCjwtModalPage" @success="handleCjwtOk" />
2024-05-06 15:15:47 +08:00
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, unref } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
2024-05-13 09:03:02 +08:00
import { Icon } from '/@/components/Icon';
import { Pagination, Empty } from 'ant-design-vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
2024-05-13 16:29:57 +08:00
import { deleteOne } from '/@/views/zy/zyCjwt/ZyCjwt.api';
2024-05-06 15:15:47 +08:00
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
2024-05-13 09:03:02 +08:00
import studentPjjgTeaList from '/@/views/site/pjjgPage/studentPjjgTeaList.vue';
2024-05-13 16:29:57 +08:00
import ZyCjwtModal from '/@/views/zy/zyCjwt/components/ZyCjwtModal.vue';
2024-05-06 15:15:47 +08:00
2024-05-06 19:41:47 +08:00
//当前路由信息
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
2024-05-13 16:29:57 +08:00
const { rwbh,xqxn } = query;//获取传递参数
2024-05-13 09:03:02 +08:00
const APagination = Pagination;
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(3);
2024-05-13 16:29:57 +08:00
const tkzjParam = ref({rwbh:rwbh});
const ZyCjwtModalPage = ref();
const cjwtSource = ref([]);
2024-05-06 19:41:47 +08:00
let router = useRouter();
2024-05-13 09:03:02 +08:00
const jxdgInfo = ref({
filePath:''
});
2024-05-06 15:15:47 +08:00
2024-05-13 16:29:57 +08:00
//常见问题新增
function addCjwtHanle(){
var params = { rwbh:rwbh,xqxn:xqxn };
ZyCjwtModalPage.value.disableSubmit = false;
ZyCjwtModalPage.value.add(params);
}
/**
* 常见问题编辑事件
*/
function handleEdit(record: Recordable) {
ZyCjwtModalPage.value.disableSubmit = false;
ZyCjwtModalPage.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleCjwtOk);
}
2024-05-06 15:15:47 +08:00
2024-05-13 16:29:57 +08:00
//常见问题回调刷新
function handleCjwtOk() {
console.log('--------cjwt ok -----------')
cjwtData(1);
}
//常见问题新增翻页
2024-05-13 09:03:02 +08:00
function handlePageChange(page: number) {
2024-05-13 16:29:57 +08:00
cjwtData(page);
}
function cjwtData(arg){
defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
cjwtSource.value = res.records;
console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource)
});
2024-05-13 09:03:02 +08:00
}
2024-05-06 15:15:47 +08:00
//进入就加载
onMounted(() => {
2024-05-13 16:29:57 +08:00
cjwtData(1);
2024-05-06 15:15:47 +08:00
});
</script>
<style lang="less" scoped>
</style>