添加解读来源状态,并隐藏。登录页的布局

This commit is contained in:
熊丽君
2021-11-05 16:02:05 +08:00
parent 81d0cce53d
commit b1986101db
5 changed files with 31 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 53 KiB

BIN
src/assets/login_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -10,10 +10,10 @@
label-width="80px" label-width="80px"
> >
<el-form-item label="解读标题" prop="title"> <el-form-item label="解读标题" prop="title">
<el-input placeholder="请输入" v-model="ruleForm.title" maxlength="48" show-word-limit></el-input> <el-input placeholder="请输入" v-model="ruleForm.title" maxlength="48" show-word-limit :disabled="editPage"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="归口" prop="attribute"> <el-form-item label="归口" prop="attribute">
<el-select v-model="ruleForm.attribute" placeholder="请选择"> <el-select v-model="ruleForm.attribute" placeholder="请选择" :disabled="editPage">
<el-option <el-option
v-for="item in attributeOptions" v-for="item in attributeOptions"
:key="item.value" :key="item.value"
@ -25,6 +25,7 @@
<el-form-item label="发布日期" required> <el-form-item label="发布日期" required>
<el-form-item prop="listDate"> <el-form-item prop="listDate">
<el-date-picker <el-date-picker
:disabled="editPage"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -34,16 +35,18 @@
</el-form-item> </el-form-item>
</el-form-item> </el-form-item>
<el-form-item label="来源" prop="source"> <el-form-item label="来源" prop="source">
<el-input placeholder="请输入" v-model="ruleForm.source" maxlength="48" show-word-limit></el-input> <el-input placeholder="请输入" v-model="ruleForm.source" maxlength="48" show-word-limit :disabled="editPage"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="正文" prop="text"> <el-form-item label="正文" prop="text">
<editor v-model="ruleForm.text" :min-height="192" /> <div id="text">
<editor v-model="ruleForm.text" :min-height="192" v-if="!editPage" />
<el-input v-html="ruleForm.text" v-else></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item v-if="ruleForm.status != 0">
<el-button type="primary" @click="submitForm('ruleForm')" <el-button type="primary" @click="submitForm('ruleForm')"
>确定</el-button >确定</el-button
> >
<!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -102,6 +105,16 @@ export default {
} }
}; };
}, },
watch: {
ruleForm: {
handler: function () {
this.$nextTick(() => {
this.formatRichText(this.ruleForm.downloadUrl, this.ruleForm.id,this.ruleForm.url);
});
},
},
deep: true,
},
methods: { methods: {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
@ -134,6 +147,11 @@ export default {
this.editPage = true; this.editPage = true;
getPolicyReadInfo({ readId: id }).then(({ data }) => { getPolicyReadInfo({ readId: id }).then(({ data }) => {
this.ruleForm = data; this.ruleForm = data;
if(data.status==0){
this.editPage = true
}else{
this.editPage = false
}
}); });
} }
} }

View File

@ -27,9 +27,9 @@
<el-card class="operate-container" shadow="never"> <el-card class="operate-container" shadow="never">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>数据列表</span> <span>数据列表</span>
<el-button class="btn-add" style="margin-bottom:15px" @click="handlePage(null)" size="mini" type="primary"> <!-- <el-button class="btn-add" style="margin-bottom:15px" @click="handlePage(null)" size="mini" type="primary">
添加解读 添加解读
</el-button> </el-button> -->
</el-card> </el-card>
<el-table <el-table
style="width: 100%" style="width: 100%"
@ -70,7 +70,7 @@
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handlePage(scope.row.id)" type="text" size="small" <el-button @click="handlePage(scope.row.id)" type="text" size="small"
>编辑</el-button >查看</el-button
> >
<el-button <el-button
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"

View File

@ -11,7 +11,7 @@
</div> </div>
</div> </div>
<div class="my-right"> <div class="my-right">
<div style="min-width:360px;max-width:360px;padding-bottom: 55px;"> <div style="min-width:360px;max-width:360px;padding-top: 55px;">
<!-- <div class="m-title">欢迎登录</div> --> <!-- <div class="m-title">欢迎登录</div> -->
<el-form <el-form
ref="loginForm" ref="loginForm"
@ -19,8 +19,8 @@
:rules="loginRules" :rules="loginRules"
class="login-form" class="login-form"
> >
<h3 class="col">嘉策科技创新服务平台</h3> <!-- <h3 class="col">嘉策科技创新服务平台</h3> -->
<h1 class="title">登录</h1> <h1 class="title"> </h1>
<div class="login-info"> <div class="login-info">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
@ -291,7 +291,7 @@ $loginForm: 383px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
img { img {
width: 405px; // width: 405px;
height: 325px; height: 325px;
} }
} }