界面优化
This commit is contained in:
parent
62f37c42da
commit
bc38c4a546
|
@ -206,3 +206,11 @@ aside {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-ellipsis {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: nowrap
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,16 @@
|
||||||
<el-table-column label="名称" align="center" prop="scaleName" />
|
<el-table-column label="名称" align="center" prop="scaleName" />
|
||||||
<el-table-column label="编码" align="center" prop="scaleCode" />
|
<el-table-column label="编码" align="center" prop="scaleCode" />
|
||||||
<el-table-column label="标题" align="center" prop="scaleTitle" />
|
<el-table-column label="标题" align="center" prop="scaleTitle" />
|
||||||
<el-table-column label="副标题" align="center" prop="scaleSubTitle" />
|
<el-table-column label="副标题" align="center" prop="scaleSubTitle">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-popover placement="top-start" title="测评详情" :width="400" trigger="hover"
|
||||||
|
:content="scope.row.scaleSubTitle">
|
||||||
|
<template #reference>
|
||||||
|
<span class="text-ellipsis">{{ scope.row.scaleSubTitle }}</span>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'" disable-transitions>
|
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'" disable-transitions>
|
||||||
|
@ -164,8 +173,8 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio value="0">停用</el-radio>
|
<el-radio :value="1">正常</el-radio>
|
||||||
<el-radio value="1">正常</el-radio>
|
<el-radio :value="0">停用</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||||
v-hasPermi="['scale:factor:remove']">删除</el-button>
|
v-hasPermi="['scale:factor:remove']">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||||
v-hasPermi="['scale:factor:export']">导出</el-button>
|
v-hasPermi="['scale:factor:export']">导出</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
@ -96,14 +96,17 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="22">
|
||||||
<el-form-item label="选择题目" prop="questionIds">
|
<el-form-item label="选择题目" prop="questionIds">
|
||||||
<el-checkbox-group v-model="form.questionIds">
|
<el-checkbox-group v-model="form.questionIds">
|
||||||
<el-checkbox v-for="item in scaleQuestionList" :key="item.questionId" :label="item.questionOrder"
|
<el-checkbox v-for="item in questionChooseList" :key="item.questionId" :label="item.questionOrder"
|
||||||
:value="item.questionId" />
|
:value="item.questionId" />
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="primary" @click="handleSelectQuestion">选择题目</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -177,6 +180,13 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="选择题目" v-model="questionVisible" width="600px" append-to-body>
|
||||||
|
<el-checkbox-group v-model="form.questionIds">
|
||||||
|
<el-checkbox v-for="item in scaleQuestionList" :key="item.questionId" :label="item.questionOrder"
|
||||||
|
:value="item.questionId" />
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -214,6 +224,8 @@ const dialog = reactive<DialogOption>({
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const questionVisible = ref(false);
|
||||||
|
|
||||||
const initFormData: SysScaleFactorForm = {
|
const initFormData: SysScaleFactorForm = {
|
||||||
factorId: undefined,
|
factorId: undefined,
|
||||||
factorName: undefined,
|
factorName: undefined,
|
||||||
|
@ -264,6 +276,10 @@ const data = reactive<PageData<SysScaleFactorForm, SysScaleFactorQuery>>({
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
function handleSelectQuestion() {
|
||||||
|
questionVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询测评因子列表 */
|
/** 查询测评因子列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
@ -387,13 +403,16 @@ const ruleTypeList = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
const scaleQuestionList = ref<SysScaleQuestionVO[]>([]);
|
const scaleQuestionList = ref<SysScaleQuestionVO[]>([]);
|
||||||
async function getScaleQuestionList() {
|
async function getScaleQuestionList() {
|
||||||
const res = await listSysScaleQuestion({scaleId})
|
const res = await listSysScaleQuestion({ scaleId })
|
||||||
scaleQuestionList.value = res.rows
|
scaleQuestionList.value = res.rows
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const questionChooseList = computed(() => {
|
||||||
|
return scaleQuestionList.value.filter(item => form.value.questionIds.includes(item.questionId))
|
||||||
|
})
|
||||||
|
|
||||||
const yzdList = ref<DictDataVO[]>([])
|
const yzdList = ref<DictDataVO[]>([])
|
||||||
async function getYzdList() {
|
async function getYzdList() {
|
||||||
const res = await getDicts('yzd')
|
const res = await getDicts('yzd')
|
||||||
|
|
|
@ -283,12 +283,3 @@ onMounted(() => {
|
||||||
getScaleTypeList()
|
getScaleTypeList()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.text-ellipsis {
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
word-break: break-all;
|
|
||||||
white-space: nowrap
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue