| | |
| | | <div class="func"> |
| | | <!--列表展示--> |
| | | <div class="list"> |
| | | <el-tree v-if="funList.length >0" :data="funList" :props="defaultProps" node-key="id" @node-click="handleNodeClick"> |
| | | <el-tree v-if="funList.length >0" :data="funList" :props="defaultProps" node-key="id" |
| | | @node-click="handleNodeClick"> |
| | | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span>{{ data.name }}</span> |
| | | <span> |
| | |
| | | </div> |
| | | </div> |
| | | <!--内容页--> |
| | | <div style="height: 100%;width: 100%" v-if="content.property == 2"> |
| | | <div style="height: 100%;width: 100%" v-if="content.property == 2"> |
| | | |
| | | <div style="height: 100%;width: 100%" class="manage" v-if="modelType=='管理'"> |
| | | <div style="height: 100%;width: 100%" class="manage" v-if="modelType=='管理'"> |
| | | <!--flash--> |
| | | <div v-if="content.type == 1"> |
| | | <avue-form :option="flashOption" v-model="flashForm" @submit="handleSubmitFile"></avue-form> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="height: 100%;width: 100%" class="view" v-else> |
| | | <div style="height: 100%;width: 100%" class="view" v-if="modelType == '预览'"> |
| | | <!--flash--> |
| | | <div v-if="content.type == 1"> |
| | | <div v-if="content.type == 1"> |
| | | |
| | | </div> |
| | | |
| | | <!--图册--> |
| | | <div style="height: 100%;width: 100%" v-if="content.type == 2"> |
| | | <Flipbook class="flipbook" :pages="flipConfig.pages" :startPage="flipConfig.pageNum" v-slot="flipbook" ref="flipbook"> |
| | | <div style="height: 100%;width: 100%" v-if="content.type == 2"> |
| | | <flipbook class="flipbook" :pages="flipConfig.pages" :startPage="flipConfig.pageNum" v-slot="flipbook" |
| | | ref="flipbook"> |
| | | <div class="action-bar"> |
| | | <left-icon class="btn left" :class="{ disabled: !flipbook.canFlipLeft }" @click="flipbook.flipLeft"/> |
| | | <left-icon class="btn left" :class="{ disabled: !flipbook.canFlipLeft }" |
| | | @click="flipbook.flipLeft"/> |
| | | <plus-icon class="btn plus" :class="{ disabled: !flipbook.canZoomIn }" @click="flipbook.zoomIn"/> |
| | | <span class="page-num">Page {{ flipbook.page }} of {{ flipbook.numPages }}</span> |
| | | <minus-icon class="btn minus" :class="{ disabled: !flipbook.canZoomOut }" @click="flipbook.zoomOut"/> |
| | | <right-icon class="btn right" :class="{ disabled: !flipbook.canFlipRight }" @click="flipbook.flipRight"/> |
| | | <minus-icon class="btn minus" :class="{ disabled: !flipbook.canZoomOut }" |
| | | @click="flipbook.zoomOut"/> |
| | | <right-icon class="btn right" :class="{ disabled: !flipbook.canFlipRight }" |
| | | @click="flipbook.flipRight"/> |
| | | </div> |
| | | </Flipbook> |
| | | </flipbook> |
| | | </div> |
| | | |
| | | <!--视频--> |
| | |
| | | type: 'upload', |
| | | limit: 1, |
| | | drag: true, |
| | | loadText: '模板上传中,请稍等', |
| | | loadText: '文件上传中,请稍等', |
| | | accept: 'image/png, image/jpeg', |
| | | propsHttp: { |
| | | res: 'data', |
| | |
| | | label: 'name' |
| | | }, |
| | | content: {}, |
| | | modelType:'管理', |
| | | modelType: '管理', |
| | | |
| | | flipConfig: { |
| | | pages: [], |
| | |
| | | hasMouse: true, |
| | | pageNum: null, |
| | | }, |
| | | iframePath:"", |
| | | iframePath: "", |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | handleSubmit(form, done) { |
| | | form.modulesId = this.modules.id |
| | | //限制只能有一个开始页和结束页 |
| | | if (form.property == 1 || form.property == 3) { |
| | | let data = this.funList |
| | | let filterArray = data.filter(e => { |
| | | return e.property == form.property |
| | | }) |
| | | if (filterArray.length > 0) { |
| | | if (form.property == 1) { |
| | | this.$message.warning("开始页已存在") |
| | | done() |
| | | return |
| | | } else if (form.property == 3) { |
| | | this.$message.warning("结束页已存在") |
| | | done() |
| | | return |
| | | } |
| | | } |
| | | } |
| | | if (!form.id) { |
| | | add(form).then(() => { |
| | | this.getAllFunc() |
| | |
| | | left: 42%; |
| | | } |
| | | |
| | | .model-type{ |
| | | .model-type { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | |
| | | height: 100vh; |
| | | } |
| | | |
| | | .page-num{ |
| | | .page-num { |
| | | color: white; |
| | | } |
| | | |