| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-03-26 10:28:33 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-05-10 17:39:49 |
| | | * @FilePath: /smart-web/src/views/master/person/main/index.vue |
| | | * @Description: è¿æ¯é»è®¤è®¾ç½®,请设置`customMade`, æå¼koroFileHeaderæ¥çé
ç½® è¿è¡è®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div class="aposcope-main"> |
| | | <div class="debugging"> |
| | | <el-button type="primary" plain style="width: 80px;">è°è¯</el-button> |
| | | </div> |
| | | <div class="conList" v-for="item in tableData"> |
| | | <div class="conTop"> |
| | | <span class="titile">{{item.name}}</span> |
| | | </div> |
| | | <div class="conBottom" v-if="item.isBindBusiness"> |
| | | <div class="first"> |
| | | <div>{{item.id == "internalMessage"?"ç«å
ä¿¡é
ç½®":"é
ç½®åç§°"}}</div> |
| | | </div> |
| | | <div class="second"> |
| | | <div>{{item.pname}}</div> |
| | | </div> |
| | | <div class="thrid" v-if="item.id != 'internalMessage'"> |
| | | <span @click="table_edit(item, index)"><el-icon><EditPen /></el-icon>ç¼è¾</span> |
| | | <span><el-icon><Delete /></el-icon>å é¤</span> |
| | | </div> |
| | | </div> |
| | | <div class="conBottom" v-if="!item.isBindBusiness"> |
| | | <el-button type="primary" plain style="margin-left: 20px;" @click="addallocation">æ°å¢é
ç½®</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <save-dialog v-if="dialog.save" ref="saveDialog" @success="addconfigSuccess" @closed="dialog.save=false"></save-dialog> |
| | | </template> |
| | | <script> |
| | | import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
| | | let icons = [] |
| | | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| | | icons.push(key) |
| | | } |
| | | import saveDialog from './editconfiguration' |
| | | export default { |
| | | name: "configuration", |
| | | data(){ |
| | | return { |
| | | dialog: { |
| | | save: false |
| | | }, |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.getConfiguration(); |
| | | }, |
| | | components: { |
| | | ...ElementPlusIconsVue,saveDialog |
| | | }, |
| | | methods: { |
| | | addallocation() { |
| | | ///api/blade-notify/notifier/config/sms/aliyunSms/metadata |
| | | }, |
| | | table_edit(row){ |
| | | console.log(row) |
| | | if(row.name == "éé") { |
| | | var url = `/api/blade-notify/notifier/config/dingTalk/dingTalkMessage/metadata`; |
| | | }else if(row.name == "ä¼ä¸å¾®ä¿¡") { |
| | | var url = `/api/blade-notify/notifier/config/weiXinQY/qyTextMessage/metadata`; |
| | | }else if(row.name == "ç«å
ä¿¡") { |
| | | //var url = `/api/blade-notify/notifier/template/internalMessage/systemDefault/config/metadata`; |
| | | }else if(row.name == "é®ä»¶") { |
| | | var url = `/api/blade-notify/notifier/config/email/embedded/metadata`; |
| | | } |
| | | this.dialog.save = true |
| | | this.$HTTP.get(url).then(res=> { |
| | | if(res.code == 200) { |
| | | this.dialog.save = true; |
| | | this.$nextTick(() => { |
| | | console.log(row,res.data) |
| | | var obj = Object.assign(row,res.data); |
| | | this.$refs.saveDialog.open('edit').setData(obj); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getConfiguration() { |
| | | this.$HTTP.get(`/api/blade-notify/notifier/config/service-list`).then(res=> { |
| | | if(res.code == 200) { |
| | | res.data.forEach(item=> { |
| | | if(item.configEntity != null) { |
| | | item.pname = item.configEntity.name; |
| | | }else { |
| | | item.pname = ""; |
| | | } |
| | | }) |
| | | this.tableData = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | addconfigSuccess() { |
| | | this.getbusiness(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .aposcope-main { |
| | | min-height: 100%; |
| | | margin: 8px; |
| | | background-color: #fff; |
| | | padding-top: 20px; |
| | | padding-bottom: 20px; |
| | | } |
| | | .conList { |
| | | margin: 0 16px 24px 16px; |
| | | border-radius: 2px; |
| | | background: #fff; |
| | | box-shadow: 0 1px 3px rgba(0, 0, 0, .16); |
| | | padding: 23px 0 15px 16px; |
| | | box-sizing: border-box; |
| | | height: 126px; |
| | | width: 47%; |
| | | position: relative; |
| | | float: left; |
| | | } |
| | | .conTop { |
| | | font-size: 18px; |
| | | } |
| | | .conBottom { |
| | | display: flex; |
| | | margin-top: 20px; |
| | | position: absolute; |
| | | width: 100%; |
| | | bottom: 20px; |
| | | left:0; |
| | | } |
| | | .conList .conBottom .first { |
| | | width: 20%; |
| | | padding-left: 30px; |
| | | } |
| | | .conList .conBottom div { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | text-align: left; |
| | | color: #333; |
| | | } |
| | | .conList .conBottom .second { |
| | | width: 60%; |
| | | justify-content: flex-start; |
| | | } |
| | | .conList .conBottom .thrid { |
| | | width: 20%; |
| | | cursor: pointer; |
| | | } |
| | | .conList .conBottom .thrid span:nth-child(1) { |
| | | margin-right: 16px; |
| | | } |
| | | .debugging { |
| | | text-align: right; |
| | | margin-bottom: 20px; |
| | | margin-right: 30px; |
| | | } |
| | | </style> |