Merge branch 'dongwu_develop' into develop

This commit is contained in:
BOE\10867418
2023-03-21 09:18:20 +08:00
16 changed files with 99 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
console.log("版本2.1.9------------"); console.log("版本2.2.0------------");
// 监听关闭浏览器 // 监听关闭浏览器
let time1 = ref(0); let time1 = ref(0);

View File

@@ -29,6 +29,10 @@ const props = defineProps({
type: String, type: String,
default: "" default: ""
}, },
pageKey: {
type: String,
default: "pageNo"
},
params: { params: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
@@ -45,7 +49,7 @@ const props = defineProps({
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]); const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
const rowSelectKeys = ref([]); const rowSelectKeys = ref([]);
const selectsData = ref([]); const selectsData = ref([]);
const params = useResetRef({ pageNo: 1, pageSize: 10 }); const params = useResetRef({ [props.pageKey]: 1, pageSize: 10 });
const postParam = computed(() => ({ ...params.value, ...props.params })); const postParam = computed(() => ({ ...params.value, ...props.params }));
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam); const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
@@ -89,13 +93,13 @@ function onSelectChange(e, l) {
const pagination = computed(() => ({ const pagination = computed(() => ({
total: total.value, total: total.value,
showSizeChanger: false, showSizeChanger: false,
current: params.value.pageNo, current: params.value[props.pageKey],
pageSize: params.value.pageSize, pageSize: params.value.pageSize,
onChange: changePagination, onChange: changePagination,
})); }));
const changePagination = (e) => { const changePagination = (e) => {
params.value.pageNo = e; params.value[props.pageKey] = e;
onFetch(); nextTick(onFetch);
}; };
function reset(v = {}) { function reset(v = {}) {

View File

@@ -3,6 +3,7 @@
<div class="select addTimeBox"> <div class="select addTimeBox">
<div class="addTime">创建时间</div> <div class="addTime">创建时间</div>
<a-range-picker <a-range-picker
:value="dateTime"
style="width: 420px" style="width: 420px"
format="YYYY-MM-DD" format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
@@ -14,14 +15,29 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {defineEmits} from "vue"; import {defineEmits,ref} from "vue";
const emit = defineEmits(["update:beginTime", "update:endTime"]); const emit = defineEmits(["update:beginTime", "update:endTime"]);
const dateTime = ref([null,null]);
const resetTime = () => {
dateTime.value = [null,null]
emit("update:beginTime", null);
emit("update:endTime", null);
}
function change(e) { function change(e) {
console.log(e)
dateTime.value = [e[0],e[1]]
emit("update:beginTime", e[0]); emit("update:beginTime", e[0]);
emit("update:endTime", e[1]); emit("update:endTime", e[1]);
} }
//暴露resetTime方法
defineExpose({
resetTime
});
</script> </script>
<style lang="scss"> <style lang="scss">
.addTimeBox { .addTimeBox {

View File

@@ -1096,6 +1096,7 @@ export default {
.drawerMain { .drawerMain {
min-width: 600px; min-width: 600px;
min-height: 1080px;
margin: 0px 32px 0px 32px; margin: 0px 32px 0px 32px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -247,6 +247,11 @@ defineExpose({ openDrawer })
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addactiveDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.addactiveDrawer { .addactiveDrawer {
.drawerMain { .drawerMain {
.header { .header {

View File

@@ -239,6 +239,11 @@ defineExpose({ openDrawer });
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addevalDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.addevalDrawer { .addevalDrawer {
.drawerMain { .drawerMain {
.header { .header {

View File

@@ -183,6 +183,11 @@ defineExpose({ openDrawer });
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addhomeworkDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.addhomeworkDrawer { .addhomeworkDrawer {
.drawerMain { .drawerMain {
.header { .header {

View File

@@ -419,6 +419,11 @@ const beforeUpload = (file) => {
background-color: #fff !important; background-color: #fff !important;
} }
.addliveDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important; background-color: #fafafa !important;
} }

View File

@@ -42,10 +42,10 @@
<div class="mii_ipt"> <div class="mii_ipt">
<div class="ipt_name"></div> <div class="ipt_name"></div>
<div class="fi_input"> <div class="fi_input">
<RangePicker v-model:beginTime="params.createBeginTime" v-model:endTime="params.createEndTime"/> <RangePicker ref="resetTime" v-model:beginTime="params.createBeginTime" v-model:endTime="params.createEndTime"/>
</div> </div>
</div> </div>
</div> </div>
<div class="mi_btns" style="margin-left: 0"> <div class="mi_btns" style="margin-left: 0">
<div class="btn btn2" @click="search"> <div class="btn btn2" @click="search">
<div class="search"></div> <div class="search"></div>
@@ -319,7 +319,7 @@
<span style="margin-right: 3px"></span> <span style="margin-right: 3px"></span>
</div> </div>
<div class="b_input"> <div class="b_input">
<FJUpload v-model:value="formData.attachName"/> <FJUpload v-model:value="formData.attach" @changevalue="changevalue"/>
</div> </div>
</div> </div>
@@ -428,7 +428,9 @@ const params = ref({
type: props.type, type: props.type,
offcourseId: "", offcourseId: "",
draftTaskId: "", draftTaskId: "",
taskId: "" taskId: "",
createBeginTime: '',
createEndTime: '',
}); });
const validated = ref(0); const validated = ref(0);
const dateTime = ref([]); const dateTime = ref([]);
@@ -449,7 +451,7 @@ const formData = useResetRef({
assessmentId: "", assessmentId: "",
workInfo: {}, workInfo: {},
examInfo: {}, examInfo: {},
attachName: "", attach: "",
type: props.type, type: props.type,
offcourseId: "", offcourseId: "",
draftTaskId: "", draftTaskId: "",
@@ -498,12 +500,14 @@ function search() {
tableRef.value.fetch(); tableRef.value.fetch();
} }
const resetTime = ref();
function reset() { function reset() {
tableRef.value.reset({ tableRef.value.reset({
type: props.type, type: props.type,
offcourseId: params.value.offcourseId, offcourseId: params.value.offcourseId,
draftTaskId: params.value.draftTaskId, draftTaskId: params.value.draftTaskId,
}); });
resetTime.value.resetTime();
} }
const closeDrawer = () => { const closeDrawer = () => {
@@ -576,6 +580,23 @@ function openDrawer(row) {
const disabledDate = (current) => current && current < dayjs().startOf("day"); const disabledDate = (current) => current && current < dayjs().startOf("day");
// 删除文件返回参数
const changevalue = (e) => {
let arr = formData.value.attach.split(",");
let newarr = [];
for (let i = 0; i < arr.length; i++) {
if (i !== e) {
newarr.push(arr[i]);
}
}
if (newarr.length == 0) {
formData.value.attach = "";
} else {
formData.value.attach = newarr.toString();
}
console.log("changevalue", e, newarr, formData.value.attach);
}
defineExpose({ openDrawer }); defineExpose({ openDrawer });
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -150,6 +150,11 @@ defineExpose({ openDrawer });
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addrefDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.addrefDrawer { .addrefDrawer {
.drawerMain { .drawerMain {
.header { .header {

View File

@@ -396,6 +396,11 @@ defineExpose({ openDrawer })
background-color: #fafafa !important; background-color: #fafafa !important;
} }
.addtestDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.outer { .outer {
background-color: #4ea6ff; background-color: #4ea6ff;
color: #fff; color: #fff;

View File

@@ -286,8 +286,7 @@ const columns = ref([
key: "opacation", key: "opacation",
width: 50, width: 50,
align: "center", align: "center",
customRender: (text) => <div class="opa" customRender: (text) => <div class="opa" onClick={() => showExamAnswer(text)}>{data.value[coursePlanIndex.value]?.answerId ? "查看答卷" : ""}</div>
onClick={() => showExamAnswer(text)}>{data.value[coursePlanIndex.value]?.testId ? "查看答卷" : ""}</div>
}, },
]); ]);
watch(() => data.value.length, () => { watch(() => data.value.length, () => {
@@ -348,8 +347,10 @@ function exportTaskStu() {
const hasten = () => { const hasten = () => {
message.success("催促成功"); message.success("催促成功");
console.log(data.value[coursePlanIndex.value])
batchSendMessage({ batchSendMessage({
courseId: props.datasource.courseId,//任务的Id // courseId: props.datasource.courseId,//任务的Id
courseId: data.value[coursePlanIndex.value].id,//任务的Id
courseName: props.datasource.name,//任务的名称 courseName: props.datasource.name,//任务的名称
logo: props.type,//项目或径的标识 1-项目 2-路径图 3面授课 logo: props.type,//项目或径的标识 1-项目 2-路径图 3面授课
targetId: infoId.value,//路径图的就是routerId,项目的是projectId;根据这张图来看的话 targetId: infoId.value,//路径图的就是routerId,项目的是projectId;根据这张图来看的话

View File

@@ -75,7 +75,7 @@
margin: 0px 4px 120px 10px; margin: 0px 4px 120px 10px;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
"> ">
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" <BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="page"
:request="useBoeApiUserInfoPage" :params="nameSearch" :request="useBoeApiUserInfoPage" :params="nameSearch"
v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable> v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable>
</div> </div>

View File

@@ -435,6 +435,10 @@ const props = defineProps({
type: Array, type: Array,
default: () => [], default: () => [],
}, },
params: {
type: Object,
default: () => ({}),
},
}); });
const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList); const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
@@ -559,9 +563,11 @@ const tableParam = ref({
studentDepartName: null, //部门名称 studentDepartName: null, //部门名称
topFlag: null, //是否是优秀学员 topFlag: null, //是否是优秀学员
pageNo: 1, pageNo: 1,
status: 1,
pageSize: 10, pageSize: 10,
type: props.type, type: props.type,
pid: props.id, pid: props.id,
...props.params
}); });
const checkgroupParam = ref({ const checkgroupParam = ref({

View File

@@ -208,6 +208,10 @@ defineExpose({openDrawer})
</script> </script>
<style lang="scss"> <style lang="scss">
.addvoteDrawer > .ant-drawer-content-wrapper {
min-width: 800px !important;
width: 800px !important;
}
.ConfirmModal { .ConfirmModal {
.ant-modal { .ant-modal {
width: 424px !important; width: 424px !important;

View File

@@ -1250,6 +1250,7 @@
<TableStudent <TableStudent
:type="3" :type="3"
:id="offcoursePlanId" :id="offcoursePlanId"
:params="{status:1}"
:columns="stuColumns" :columns="stuColumns"
:visable="sm_hs" :visable="sm_hs"
:permissions="permissions" :permissions="permissions"