代码整理
This commit is contained in:
1 parent
0f1c3b51e5
commit
1f99dcd134
6 files changed
+97
-111
No files matched your search
@@ -54,6 +54,7 @@
|
||||
</template>
|
||||
<!-- 表格操作按钮 -->
|
||||
<template v-slot:item.action="{ item }">
|
||||
<template v-if="!isMobile">
|
||||
<span role="button" class="primary--text font-weight-medium font-size-2" @click="doUiAction('viewItem', { item })">
|
||||
<v-icon size="16" class="primary--text">mdi-note-edit-outline</v-icon>预览
|
||||
</span>
|
||||
@@ -61,9 +62,24 @@
|
||||
<v-icon size="16" class="primary--text">mdi-note-edit-outline</v-icon>修改
|
||||
</span>
|
||||
</template>
|
||||
<!-- <template v-slot:item.afficheTitle="{ item }">
|
||||
<a @click="doUiAction('viewItem', { item })">{{item.afficheTitle}}</a>
|
||||
</template> -->
|
||||
<!-- 手机端 -->
|
||||
<v-menu offset-y v-if="isMobile">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span role="button" class="success--text font-weight-medium font-size-2"
|
||||
v-bind="attrs" v-on="on">
|
||||
操作<v-icon size="14" class="success--text">mdi-chevron-down</v-icon>
|
||||
</span>
|
||||
</template>
|
||||
<v-list dense>
|
||||
<v-list-item @click="doUiAction('viewItem', { item })">
|
||||
<v-list-item-title>预览</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="item.afficheStatus==='草稿'" @click="doUiAction('startUpdateItem', { item })">
|
||||
<v-list-item-title>修改</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!-- 没有数据 -->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
@@ -132,9 +148,9 @@
|
||||
|
||||
<!-- 抽屉操作按钮 -->
|
||||
<v-row class="justify-end mx-0 mt-8 px-6">
|
||||
<v-btn color="success" @click="doUiAction('createItem', {afficheStatus: '已发送'})" small>发送</v-btn>
|
||||
<v-btn color="success" class="ml-2" @click="doUiAction('createItem', {afficheStatus: '草稿'})" small>存为草稿</v-btn>
|
||||
<v-btn class="elevation-0 ml-2" @click="isCreateDrawerShown = false" small>取消</v-btn>
|
||||
<v-btn color="success" @click="doUiAction('createItem', {afficheStatus: '已发送'})" small :loading="isCreateLoading">发送</v-btn>
|
||||
<v-btn color="success" class="ml-2" @click="doUiAction('createItem', {afficheStatus: '草稿'})" small :loading="isCreateLoading">存为草稿</v-btn>
|
||||
<v-btn class="elevation-0 ml-2" @click="isCreateDrawerShown = false" small :loading="isCreateLoading">取消</v-btn>
|
||||
</v-row>
|
||||
</v-form>
|
||||
<select-org-user-dialog
|
||||
@@ -256,20 +272,8 @@
|
||||
template: "#app-template",
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
// 面包屑
|
||||
breadcrumbs: [
|
||||
{
|
||||
text: "首页",
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
text: "通知管理",
|
||||
disabled: true,
|
||||
},
|
||||
],
|
||||
isHelpPageDrawerShown: false,
|
||||
isHelpPageDrawerLoaded: false,
|
||||
isMobile: window.innerWidth < 500,
|
||||
// 表格相关数据
|
||||
isTableZebraLineShown: true,
|
||||
validationRules: {
|
||||
@@ -282,7 +286,6 @@
|
||||
{ text: "已发送", value: "已发送" },
|
||||
],
|
||||
},
|
||||
currentSceneId: null,
|
||||
serverSearchInput: {
|
||||
|
||||
},
|
||||
@@ -300,6 +303,8 @@
|
||||
isCreateDrawerShown: false,
|
||||
createItem: {},
|
||||
createActionData: {},
|
||||
isCreateLoading: false,
|
||||
|
||||
deleteItem: {},
|
||||
deleteItemId: null,
|
||||
|
||||
@@ -309,9 +314,6 @@
|
||||
|
||||
userList: [],
|
||||
isViewDrawerShown: false,
|
||||
|
||||
isMoreMenuShown: false,
|
||||
|
||||
isDialogShown: false,
|
||||
}),
|
||||
watch: {
|
||||
@@ -321,6 +323,11 @@
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
},
|
||||
async created() { },
|
||||
mounted() {
|
||||
this.doUiAction("initPageData");
|
||||
@@ -447,6 +454,7 @@
|
||||
},
|
||||
|
||||
async doCreateItem() {
|
||||
this.isCreateLoading = true
|
||||
await window.vtoast.loading("新增数据");
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
@@ -464,6 +472,7 @@
|
||||
},
|
||||
});
|
||||
await window.vtoast.success("新增数据成功");
|
||||
this.isCreateLoading = false
|
||||
},
|
||||
async closeCreateDrawer() {
|
||||
this.isCreateDrawerShown = false;
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</div>
|
||||
<div class="jianghu-doc-contentDoc-main-doc">
|
||||
<div class="markdown-body editormd-preview-container jianghu-markdown" id="doc-content">
|
||||
<h1 id="links-0">{{article.taskTitle}}</h1>
|
||||
<h1 id="links-0">{{article.afficheTitle}}</h1>
|
||||
<!-- 封面 -->
|
||||
<template v-if="article.articleCoverImage">
|
||||
<div class="items-center-box" style="margin-bottom: 20px">
|
||||
@@ -90,7 +90,7 @@
|
||||
<video :src="resourceUrl(article.articleVideoUrl)" style="width: 100%; height: auto" controls
|
||||
preload="none"></video>
|
||||
</template>
|
||||
<md2html :article-content="article.taskContent"></md2html>
|
||||
<md2html :article-content="article.afficheContent"></md2html>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -181,9 +181,9 @@
|
||||
},
|
||||
setLocationParams() {
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
const taskId = urlParams.get('taskId');
|
||||
if (taskId) {
|
||||
this.taskId = taskId;
|
||||
const afficheId = urlParams.get('afficheId');
|
||||
if (afficheId) {
|
||||
this.afficheId = afficheId;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
window.vtoast.fail('页面路径缺少参数');
|
||||
@@ -198,7 +198,7 @@
|
||||
pageId: 'afficheViewer',
|
||||
actionId: 'selectItemList',
|
||||
where: {
|
||||
taskId: this.taskId
|
||||
afficheId: this.afficheId
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@
|
||||
this.isLoading = false
|
||||
const article = result.data.appData.resultData.rows[0] || {}
|
||||
|
||||
// article.taskContent = article.taskContent.replaceAll('__appId__', '<$ ctx.app.config.appId $>')
|
||||
// article.afficheContent = article.afficheContent.replaceAll('__appId__', '<$ ctx.app.config.appId $>')
|
||||
this.article = article;
|
||||
},
|
||||
resourceUrl(path) {
|
||||
|
||||
Reference in new issue
Block a user