修改bug
This commit is contained in:
parent
65b5b9b28c
commit
cef8a819de
|
@ -80,7 +80,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose } from 'vue';
|
||||
import { ref,watch,reactive,defineExpose, createVNode,h } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
|
@ -88,6 +88,8 @@ import { getUserId, addTingKeLog } from '/@/views/site/utils/index';
|
|||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import dayjs from 'dayjs';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { CloseOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
@ -104,6 +106,8 @@ const confirmLoading = ref<boolean>(false);
|
|||
let listData = ref<any>([]);
|
||||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const listTkjlApi = (params) => defHttp.get({ url: '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId', params });
|
||||
|
||||
const props = defineProps({
|
||||
queryParam:{ type:Object },
|
||||
type: { type: String },
|
||||
|
@ -166,7 +170,30 @@ function isNow(item){
|
|||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
let userid = getUserId();
|
||||
listTkjlApi({ userid: userid, ketangbiaoid:item.ketangbiaoid}).then(res => {
|
||||
var list = res
|
||||
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list)
|
||||
if(list.length>0){
|
||||
var score = list[0].score
|
||||
if(score){
|
||||
Modal.error({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:200px;text-align:center;'}, [
|
||||
h('icon', {style:'font-size:80px;font-weight:600;color:red;'}, createVNode(CloseOutlined)),
|
||||
h('p',{style:'font-size:22px;font-weight:600;color:black;'}, '已经对此课程进行评价,不可重复评价!'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { ref,watch,reactive,defineExpose,onMounted, createVNode,h } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
|
@ -66,6 +66,8 @@ import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
|||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { CloseOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
@ -85,6 +87,7 @@ let listData = ref<any>([]);
|
|||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const listTkjlApi = (params) => defHttp.get({ url: '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId', params });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
|
@ -132,7 +135,30 @@ function loadData(num?) {
|
|||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
let userid = getUserId();
|
||||
listTkjlApi({ userid: userid, ketangbiaoid:item.ketangbiaoid}).then(res => {
|
||||
var list = res
|
||||
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list)
|
||||
if(list.length>0){
|
||||
var score = list[0].score
|
||||
if(score){
|
||||
Modal.error({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:200px;text-align:center;'}, [
|
||||
h('icon', {style:'font-size:80px;font-weight:600;color:red;'}, createVNode(CloseOutlined)),
|
||||
h('p',{style:'font-size:22px;font-weight:600;color:black;'}, '已经对此课程进行评价,不可重复评价!'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { ref,watch,reactive,defineExpose,onMounted, createVNode,h } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
|
@ -54,6 +54,8 @@ import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
|||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { CloseOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
@ -73,6 +75,7 @@ let listData = ref<any>([]);
|
|||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const listTkjlApi = (params) => defHttp.get({ url: '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId', params });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
|
@ -124,7 +127,30 @@ function loadData(num?) {
|
|||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
let userid = getUserId();
|
||||
listTkjlApi({ userid: userid, ketangbiaoid:item.ketangbiaoid}).then(res => {
|
||||
var list = res
|
||||
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list)
|
||||
if(list.length>0){
|
||||
var score = list[0].score
|
||||
if(score){
|
||||
Modal.error({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:200px;text-align:center;'}, [
|
||||
h('icon', {style:'font-size:80px;font-weight:600;color:red;'}, createVNode(CloseOutlined)),
|
||||
h('p',{style:'font-size:22px;font-weight:600;color:black;'}, '已经对此课程进行评价,不可重复评价!'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { ref,watch,reactive,defineExpose,onMounted, createVNode,h } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
|
@ -54,6 +54,8 @@ import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
|||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { CloseOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
@ -73,6 +75,7 @@ let listData = ref<any>([]);
|
|||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const listTkjlApi = (params) => defHttp.get({ url: '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId', params });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
|
@ -116,7 +119,30 @@ function loadData(num?) {
|
|||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
let userid = getUserId();
|
||||
listTkjlApi({ userid: userid, ketangbiaoid:item.ketangbiaoid}).then(res => {
|
||||
var list = res
|
||||
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list)
|
||||
if(list.length>0){
|
||||
var score = list[0].score
|
||||
if(score){
|
||||
Modal.error({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:200px;text-align:center;'}, [
|
||||
h('icon', {style:'font-size:80px;font-weight:600;color:red;'}, createVNode(CloseOutlined)),
|
||||
h('p',{style:'font-size:22px;font-weight:600;color:black;'}, '已经对此课程进行评价,不可重复评价!'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="margin-top:20px;text-align:center;">
|
||||
<a-button type="primary" class="itemYyButton" @click="tingKeZuJiAddModal.view({ ketangbiaoid: item.id })">评价</a-button>
|
||||
<a-button type="primary" class="itemYyButton" @click="txpjFun(item)">评价</a-button>
|
||||
<a-button type="primary" class="itemBaoCuoButton" @click="funQxyy(item)">取消预约</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
|
@ -48,20 +48,23 @@
|
|||
<addModalPage ref="tingKeZuJiAddModal"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onMounted } from 'vue';
|
||||
import { ref, reactive, computed, onMounted, createVNode,h } from 'vue';
|
||||
import { TeamOutlined } from '@ant-design/icons-vue';
|
||||
// import { dateUtil, formatToDate } from '/@/utils/dateUtil';
|
||||
import { getUserId } from '/@/views/site/utils/index';
|
||||
import { downloadByUrl } from '/@/utils/file/download';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import { CloseOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
enum Api {
|
||||
list = '/kcYuyue/kcYuyue/findTingkeZuJiByPage',
|
||||
deleteOne = '/kcYuyue/kcYuyue/delete',
|
||||
edit='/kcYuyue/kcYuyue/edit',
|
||||
listTkjl = '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId'
|
||||
}
|
||||
|
||||
const tingKeZuJiAddModal = ref();
|
||||
|
@ -72,6 +75,7 @@ const emit = defineEmits(['ortherLoad']);
|
|||
* @param params
|
||||
*/
|
||||
const listApi = (params) => defHttp.get({ url: Api.list, params });
|
||||
const listTkjlApi = (params) => defHttp.get({ url: Api.listTkjl, params });
|
||||
|
||||
const list = ref<any>([]);
|
||||
onMounted(() => {
|
||||
|
@ -88,6 +92,37 @@ function formatTime(time: string) {
|
|||
return [t_i_m_e[0],t_i_m_e[1],':',t_i_m_e[2],t_i_m_e[3]].join('');
|
||||
}
|
||||
|
||||
|
||||
function txpjFun(item){
|
||||
let ketangbiaoid = item.id;
|
||||
item.ketangbiaoid = ketangbiaoid;
|
||||
let userid = getUserId();
|
||||
listTkjlApi({ userid: userid, ketangbiaoid:ketangbiaoid}).then(res => {
|
||||
var list = res
|
||||
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list)
|
||||
if(list.length>0){
|
||||
var score = list[0].score
|
||||
if(score){
|
||||
Modal.error({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:200px;text-align:center;'}, [
|
||||
h('icon', {style:'font-size:80px;font-weight:600;color:red;'}, createVNode(CloseOutlined)),
|
||||
h('p',{style:'font-size:22px;font-weight:600;color:black;'}, '已经对此课程进行评价,不可重复评价!'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
}else{
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预约
|
||||
* @param record 主要获取课程id
|
||||
|
@ -107,11 +142,9 @@ function funQxyy(record){
|
|||
function newFunction() {
|
||||
let pageSize = 4;
|
||||
var width = window.screen.width * window.devicePixelRatio;
|
||||
console.log(`🚀 ~ file: index.vue:110 ~ newFunction ~ width:`, width)
|
||||
if(width<800){
|
||||
pageSize = 1;
|
||||
}
|
||||
console.log(`🚀 ~ file: index.vue:113 ~ newFunction ~ pageSize:`, pageSize)
|
||||
listApi({ pageSize: pageSize, isdeleted: 0, userid: getUserId(), isOrderByNow: true }).then(res => {
|
||||
list.value = (res?.records) ?? [];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue