提交 1f41cc81 authored 作者: pengxiaohui's avatar pengxiaohui

feat: 优化样式

上级 40f043fc
......@@ -24,8 +24,8 @@ export default {
data() {
return {
menuList: [
{ name: '案例管理', path: '/case', icon: 'el-icon-files' },
{ name: '类型管理', path: '/category', icon: 'el-icon-coin' }
{ name: '类型管理', path: '/category', icon: 'el-icon-coin' },
{ name: '案例管理', path: '/case', icon: 'el-icon-files' }
]
}
},
......
......@@ -12,6 +12,10 @@
<el-descriptions-item>
<template slot="label">创建时间</template>{{ form.created_at }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">案例文档</template>
<p class="pdf-item" v-for="item in form.pdf_uris" :key="item">{{item}} <el-button type="primary" size="mini" plain style="margin-left:20px;" @click="handlePreview(item)">预览</el-button></p>
</el-descriptions-item>
</el-descriptions>
</template>
<script>
......@@ -25,10 +29,11 @@ export default {
data() {
return {
form: {
id: '11111111111111',
name: '22222',
tag: '3111111111111111111',
created_at: '2021-11-16 09:30:00'
id: '',
name: '',
tag: '',
created_at: '',
pdf_uris: []
}
}
},
......@@ -40,6 +45,9 @@ export default {
this.getBaseInfo()
},
methods: {
handlePreview(url) {
window.open(url)
},
getBaseInfo() {
getCaseDetails(this.id).then(res => {
this.form = res.data
......@@ -57,4 +65,7 @@ export default {
line-height: 48px;
color: #494949;
}
.pdf-item{
line-height:26px;
}
</style>
\ No newline at end of file
......@@ -11,7 +11,7 @@
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="名称" prop="subject" min-width="120" />
<el-table-column label="标识" prop="tag" min-width="110" />
<el-table-column label="分数" prop="score" min-width="110" />
<!-- <el-table-column label="分数" prop="score" min-width="110" /> -->
<el-table-column label="操作" min-width="100">
<template slot-scope="subScope">
<el-button type="text" @click="handleEditQues(scope.row, subScope.row)">编辑</el-button>
......
......@@ -9,10 +9,10 @@
<el-button type="danger" plain @click="handleDelete(row)">删除</el-button>
</template>
</app-list>
<el-dialog :title="isCreate ? '创建答案':'编辑答案'" :visible.sync="dialogVisible" width="460px" append-to-body :destroy-on-close="true">
<el-dialog :title="isCreate ? '创建答案':'编辑答案'" :visible.sync="dialogVisible" width="660px" append-to-body :destroy-on-close="true">
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="120px">
<el-form-item label="答案" prop="answer">
<el-input v-model="form.answer" size="small" placeholder="请输入答案"/>
<el-input v-model="form.answer" size="small" placeholder="请输入答案" type="textarea" :rows="3"/>
</el-form-item>
<el-form-item label="唯一标识" prop="tag">
<el-input v-model="form.tag" size="small" placeholder="请输入唯一标识" :disabled="!isCreate"/>
......@@ -37,7 +37,7 @@ const defaultForm = {
answer: '',
tag: '',
score: 0,
matching_degree: 0
matching_degree: 100
}
export default {
props: {
......
......@@ -49,6 +49,7 @@ export default {
{ label: 'ID', prop: 'id' },
{ label: '名称', prop: 'name' },
{ label: '唯一标识', prop: 'tag' },
{ label: '分类', prop: 'category.name' },
{ label: '创建时间', prop: 'created_at' },
{ label: '操作', slots: 'table-x', align: 'right', width: 220 }
]
......
......@@ -5,7 +5,7 @@
<el-button type="primary" @click="handleCreate">新增</el-button>
</template>
<template v-slot:table-x="{ row }">
<el-button plain>查看</el-button>
<!-- <el-button plain>查看</el-button> -->
<el-button type="primary" plain @click="handleEdit(row)">编辑</el-button>
<el-button type="danger" plain @click="handleRemove(row)">删除</el-button>
</template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论