¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-button @click="outerVisible = true">æµç¨æµè¯</el-button> |
| | | <el-dialog :title="`æ§è¡${title}`" width="90%" append-to-body="true" :visible.sync="outerVisible"> |
| | | <div class="dialogwarp"> |
| | | <div class="dialogwarp_tab"> |
| | | <el-card class="dialogwarp_tab_card"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="ä¸å¡æ°æ®ä¿¡æ¯" name="first"> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æµç¨è·è¸ª" name="second"> |
| | | <avue-crud :data="data" :option="option" ref="crud"> |
| | | </avue-crud> |
| | | <el-image style="width: 100%; height: 100%" :src="url" fit="cover"></el-image> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </div> |
| | | <div class="dialogwarp_card"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>å½åä»»å¡ï¼</span> |
| | | <span>{{ title }}</span> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>请å¨ä¸æ¹è¾å
¥æ¨çå®¡æ¹æè§ï¼</p> |
| | | <el-input type="textarea" :rows="4" placeholder="请è¾å
¥å
容" v-model="opinionVal"> |
| | | </el-input> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å®¡æ¹æè§éä»¶ï¼</p> |
| | | <el-upload drag action="https://jsonplaceholder.typicode.com/posts/" multiple |
| | | style="width: 100%;"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å·²ä¸ä¼ å®¡æ¹æä»¶ï¼</p> |
| | | <el-card class="box-card"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table-column prop="date" label="æä»¶å"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="ä¸ä¼ 人 "> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æä½"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <el-button v-if="!isRefuse" type="primary" size="mini" @click="handelAgree">åæ</el-button> |
| | | <el-button v-if="!isAgree" type="primary" size="mini" @click="handelRefuse">ä¸åæ</el-button> |
| | | <el-button v-if="isAgree && !isRefuse" type="primary" size="mini" @click="handelRevert" |
| | | v-for="item in btnList" :key="item">{{ item }}</el-button> |
| | | <el-button v-if="isRefuse" type="primary" size="mini" @click="handelExecute">æ§è¡</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | outerVisible: false, |
| | | destroyClose: true, |
| | | activeName: 'first', |
| | | fits: ['fill', 'contain', 'cover', 'none', 'scale-down'], |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | title: 'ä¸å¡æµè¯-ç³è¯·-ç©å-å®¡æ ¸', |
| | | data: [ |
| | | { |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | } |
| | | ], |
| | | btnList: ['è¿å1', 'è¿å1', 'è¿å1'], |
| | | isAgree: false, |
| | | isRefuse: false, |
| | | opinionVal: '', |
| | | option: { |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | index: true, |
| | | header: false, |
| | | stripe: true, |
| | | indexLabelClassName: 'åºå·', |
| | | column: [ |
| | | { label: 'ä»»å¡åç§°', prop: 'name', minWidth: 120 }, |
| | | { label: 'æ§è¡æä½', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å¼å§æ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å®¡æ¹æè§', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | { label: 'æ§è¡äºº', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å®ææ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å·²ä¸ä¼ å®¡æ¹æä»¶', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | closeDialog() { |
| | | this.destroyClose = true |
| | | this.outerVisible = false |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(event) |
| | | }, |
| | | handelAgree() { |
| | | this.isAgree = !this.isAgree |
| | | this.outerVisible = false |
| | | console.log(this.isAgree) |
| | | }, |
| | | handelRefuse() { |
| | | if (!this.opinionVal) { |
| | | this.$alert('å½å¤çæ¹å¼ä¸ºä¸åææ¶ï¼éè¦å¡«åå®¡æ¹æè§', 'æç¤ºä¿¡æ¯', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | }).then(() => { |
| | | |
| | | }); |
| | | } else { |
| | | this.isRefuse = true |
| | | this.isAgree = true |
| | | this.outerVisible = false |
| | | this.opinionVal = '' |
| | | } |
| | | }, |
| | | handelExecute() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | this.isRefuse = false |
| | | }, |
| | | handelRevert() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .dialogwarp { |
| | | display: -webkit-box; |
| | | display: -ms-flexbox; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 70vh; |
| | | |
| | | &_tab { |
| | | width: 79%; |
| | | |
| | | |
| | | &_card { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | &_card { |
| | | // margin-left: 20px; |
| | | width: 20%; |
| | | } |
| | | } |
| | | |
| | | /deep/ .el-upload, |
| | | /deep/ .el-upload-dragger { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | /deep/ .el-upload-dragger .el-icon-upload { |
| | | margin: 15px 0 16px; |
| | | } |
| | | </style> |