|
|
@@ -49,6 +49,17 @@
|
|
|
v-hasPermi="['business:digitalBaseCategory:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-setting"
|
|
|
+ size="mini"
|
|
|
+ @click="openHeaderConfig"
|
|
|
+ v-hasPermi="['business:digitalBaseCategory:edit']"
|
|
|
+ >顶部展示配置</el-button>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="digitalBaseCategoryList" @selection-change="handleSelectionChange">
|
|
|
@@ -106,6 +117,42 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
+ <el-drawer
|
|
|
+ :visible.sync="headerConfigOpen"
|
|
|
+ title="数字化底座顶部展示配置"
|
|
|
+ size="560px"
|
|
|
+ direction="rtl"
|
|
|
+ append-to-body
|
|
|
+ :wrapperClosable="false"
|
|
|
+ >
|
|
|
+ <div class="drawer-body" v-loading="headerConfigLoading">
|
|
|
+ <el-form ref="headerConfigForm" :model="headerConfigForm" label-width="120px">
|
|
|
+ <el-form-item label="顶部 Banner" prop="digitalBaseBannerUrl">
|
|
|
+ <image-upload v-model="headerConfigForm.digitalBaseBannerUrl" :limit="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="Banner 辅助标题" prop="digitalBaseEyebrow">
|
|
|
+ <el-input v-model="headerConfigForm.digitalBaseEyebrow" maxlength="100" show-word-limit placeholder="例如:基于钉钉" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="Banner 主标题" prop="digitalBaseTitle">
|
|
|
+ <el-input v-model="headerConfigForm.digitalBaseTitle" type="textarea" :rows="3" maxlength="300" show-word-limit placeholder="请输入 Banner 主标题" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="Banner 副标题" prop="digitalBaseSubtitle">
|
|
|
+ <el-input v-model="headerConfigForm.digitalBaseSubtitle" maxlength="200" show-word-limit placeholder="例如:驱动组织效能与业务创新" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专业版名称" prop="digitalBaseType1Name">
|
|
|
+ <el-input v-model="headerConfigForm.digitalBaseType1Name" maxlength="100" show-word-limit placeholder="例如:钉钉专业版" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专属版名称" prop="digitalBaseType2Name">
|
|
|
+ <el-input v-model="headerConfigForm.digitalBaseType2Name" maxlength="100" show-word-limit placeholder="例如:钉钉专属版" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="drawer-footer">
|
|
|
+ <el-button type="primary" :loading="headerConfigLoading" @click="submitHeaderConfig">保 存</el-button>
|
|
|
+ <el-button @click="headerConfigOpen = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+
|
|
|
<!-- 添加或修改数字化底座模块对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
@@ -228,7 +275,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listDigitalBaseCategory, getDigitalBaseCategory, delDigitalBaseCategory, addDigitalBaseCategory, updateDigitalBaseCategory } from "@/api/business/digitalBaseCategory"
|
|
|
+import { listDigitalBaseCategory, getDigitalBaseCategory, delDigitalBaseCategory, addDigitalBaseCategory, updateDigitalBaseCategory, getDigitalBaseHeaderConfig, updateDigitalBaseHeaderConfig } from "@/api/business/digitalBaseCategory"
|
|
|
import { listDigitalBaseOfficial, getDigitalBaseOfficial, delDigitalBaseOfficial, addDigitalBaseOfficial, updateDigitalBaseOfficial } from "@/api/business/digitalBaseOfficial"
|
|
|
|
|
|
export default {
|
|
|
@@ -274,6 +321,18 @@ export default {
|
|
|
{ required: true, message: "请选择模块类型", trigger: "change" }
|
|
|
]
|
|
|
},
|
|
|
+ // 页面顶部展示配置
|
|
|
+ headerConfigOpen: false,
|
|
|
+ headerConfigLoading: false,
|
|
|
+ headerConfigForm: {
|
|
|
+ id: null,
|
|
|
+ digitalBaseBannerUrl: null,
|
|
|
+ digitalBaseEyebrow: null,
|
|
|
+ digitalBaseTitle: null,
|
|
|
+ digitalBaseSubtitle: null,
|
|
|
+ digitalBaseType1Name: null,
|
|
|
+ digitalBaseType2Name: null
|
|
|
+ },
|
|
|
// 内容抽屉
|
|
|
officialDrawerOpen: false,
|
|
|
officialDrawerTitle: "",
|
|
|
@@ -411,6 +470,29 @@ export default {
|
|
|
this.form.categoryContent = null
|
|
|
}
|
|
|
},
|
|
|
+ // 打开页面顶部展示配置
|
|
|
+ openHeaderConfig() {
|
|
|
+ this.headerConfigOpen = true
|
|
|
+ this.headerConfigLoading = true
|
|
|
+ getDigitalBaseHeaderConfig().then(response => {
|
|
|
+ this.headerConfigForm = { ...response.data }
|
|
|
+ }).finally(() => {
|
|
|
+ this.headerConfigLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存页面顶部展示配置
|
|
|
+ submitHeaderConfig() {
|
|
|
+ this.$refs["headerConfigForm"].validate(valid => {
|
|
|
+ if (!valid) return
|
|
|
+ this.headerConfigLoading = true
|
|
|
+ updateDigitalBaseHeaderConfig(this.headerConfigForm).then(() => {
|
|
|
+ this.$modal.msgSuccess("保存成功")
|
|
|
+ this.headerConfigOpen = false
|
|
|
+ }).finally(() => {
|
|
|
+ this.headerConfigLoading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids
|
|
|
@@ -506,4 +588,9 @@ export default {
|
|
|
.drawer-body {
|
|
|
padding: 10px 20px;
|
|
|
}
|
|
|
+
|
|
|
+.drawer-footer {
|
|
|
+ padding-top: 10px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
</style>
|