2db4a37b by 蔡俊立
2 parents f9c86583 4521af90
...@@ -53,17 +53,6 @@ const defaultCallback = action => { ...@@ -53,17 +53,6 @@ const defaultCallback = action => {
53 callback(action); 53 callback(action);
54 } 54 }
55 } 55 }
56 if (currentMsg.resolve) {
57 if (action === 'confirm') {
58 if (instance.showInput) {
59 currentMsg.resolve({ value: instance.inputValue, action });
60 } else {
61 currentMsg.resolve(action);
62 }
63 } else if (currentMsg.reject && (action === 'cancel' || action === 'close')) {
64 currentMsg.reject(action);
65 }
66 }
67 } 56 }
68 }; 57 };
69 58
...@@ -120,7 +109,7 @@ const showNextMsg = () => { ...@@ -120,7 +109,7 @@ const showNextMsg = () => {
120 } 109 }
121 }; 110 };
122 111
123 const MessageBox = function(options, callback) { 112 const MessageBox = function (options, callback) {
124 if (Vue.prototype.$isServer) return; 113 if (Vue.prototype.$isServer) return;
125 if (typeof options === 'string' || isVNode(options)) { 114 if (typeof options === 'string' || isVNode(options)) {
126 options = { 115 options = {
......
1 <template> 1 <template>
2 <transition name="msgbox-fade"> 2 <transition name="msgbox-fade">
3 <div class="el-message-box__wrapper" tabindex="-1" 3 <div class="el-message-box__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClick" role="dialog"
4 v-show="visible" @click.self="handleWrapperClick" role="dialog"
5 aria-modal="true" :aria-label="title || 'dialog'"> 4 aria-modal="true" :aria-label="title || 'dialog'">
6 <div class="el-message-box" :class="[customClass, center && 'el-message-box--center']"> 5 <div class="el-message-box" :class="[customClass, center && 'el-message-box--center']">
7 <div class="el-message-box__content"> 6 <div class="el-message-box__content">
...@@ -187,11 +186,6 @@ export default { ...@@ -187,11 +186,6 @@ export default {
187 visible (val) { 186 visible (val) {
188 if (val) { 187 if (val) {
189 this.uid++; 188 this.uid++;
190 if (this.$type === 'alert' || this.$type === 'confirm') {
191 this.$nextTick(() => {
192 this.$refs.confirm.$el.focus();
193 });
194 }
195 this.focusAfterClosed = document.activeElement; 189 this.focusAfterClosed = document.activeElement;
196 messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFirstFocus()); 190 messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFirstFocus());
197 } 191 }
...@@ -267,9 +261,11 @@ export default { ...@@ -267,9 +261,11 @@ export default {
267 .el-message-box__wrapper { 261 .el-message-box__wrapper {
268 background: none; 262 background: none;
269 } 263 }
264
270 .el-message-box { 265 .el-message-box {
271 border: none; 266 border: none;
272 } 267 }
268
273 .el-message-box__content { 269 .el-message-box__content {
274 min-height: 150px; 270 min-height: 150px;
275 padding-top: 30px; 271 padding-top: 30px;
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
9 </div> 9 </div>
10 <div class="right-menu"> 10 <div class="right-menu">
11 <svg-icon class="function" icon-class='function' /> 11 <svg-icon class="function" icon-class='function' />
12 <el-dropdown class="avatar-container right-menu-item hover-effect" @command="handleCommand"> 12 <div class="avatar-wrapper right-menu-item hover-effect">
13 <div class="avatar-wrapper">
14 <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> 13 <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" />
15 <span style="margin-left: 10px;">{{ name }}</span> 14 <span style="margin-left: 10px;">{{ name }}</span>
16 </div> 15 </div>
17 </el-dropdown>
18 16
19 <svg-icon class="shutdown" icon-class='shutdown' /> 17 <svg-icon class="shutdown" icon-class='shutdown' />
20 </div> 18 </div>
...@@ -220,7 +218,6 @@ export default { ...@@ -220,7 +218,6 @@ export default {
220 } 218 }
221 } 219 }
222 220
223 .avatar-container {
224 .avatar-wrapper { 221 .avatar-wrapper {
225 position: relative; 222 position: relative;
226 display: flex; 223 display: flex;
...@@ -243,6 +240,5 @@ export default { ...@@ -243,6 +240,5 @@ export default {
243 } 240 }
244 } 241 }
245 } 242 }
246 }
247 } 243 }
248 </style> 244 </style>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 top: $headerHeight; 14 top: $headerHeight;
15 bottom: 0; 15 bottom: 0;
16 left: 0; 16 left: 0;
17 z-index: 1001; 17 z-index: 80;
18 background-color: $subMenuBg; 18 background-color: $subMenuBg;
19 // overflow: hidden; 19 // overflow: hidden;
20 20
......
...@@ -19,16 +19,14 @@ ...@@ -19,16 +19,14 @@
19 <h5 class="title">系统通知</h5> 19 <h5 class="title">系统通知</h5>
20 <i class="el-icon-s-unfold pointer"></i> 20 <i class="el-icon-s-unfold pointer"></i>
21 </div> 21 </div>
22 <vue-seamless-scroll :data="noticeList" :class-option="classOption">
23 <ul> 22 <ul>
24 <li v-for="(item, index) in noticeList" :key="index" @click="handleNotice" class="flexst pointer"> 23 <li v-for="(item, index) in noticeList" :key="index" @click="handleNotice(item)" class="flexst pointer">
25 <p class="list-title">{{ item.noticeTitle }}</p> 24 <p class="list-title">{{ item.noticeTitle }}</p>
26 <p class="marginZL15">{{ item.createtime.substring(0, 10) }}</p> 25 <p class="marginZL15">{{ item.createtime.substring(0, 10) }}</p>
27 <p v-if="item.userBrowse == '1'" style="color:red">未读</p> 26 <p v-if="item.userBrowse == '1'" style="color:red">未读</p>
28 <p v-else>已读</p> 27 <p v-else>已读</p>
29 </li> 28 </li>
30 </ul> 29 </ul>
31 </vue-seamless-scroll>
32 </el-card> 30 </el-card>
33 </el-col> 31 </el-col>
34 </el-row> 32 </el-row>
...@@ -150,25 +148,17 @@ export default { ...@@ -150,25 +148,17 @@ export default {
150 year: '1996', 148 year: '1996',
151 value: 31056 149 value: 31056
152 }], 150 }],
151 // 系统通知
152 noticeData: {
153
154 },
153 noticeList: [], 155 noticeList: [],
154 todoList: [], 156 todoList: [],
155 doneList: [], 157 doneList: [],
156 policyList: [] 158 policyList: [],
159
157 } 160 }
158 }, 161 },
159 // 计算属性 类似于data概念
160 computed: {
161 classOption () {
162 return {
163 step: 0.5, // 数值越大速度滚动越快
164 limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
165 hoverStop: true, // 是否开启鼠标悬停stop
166 direction: 1, // 0向下 1向上 2向左 3向右
167 openWatch: true, // 开启数据实时监控刷新dom
168 singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
169 };
170 },
171 },
172 mounted () { 162 mounted () {
173 this.buildChart(); 163 this.buildChart();
174 this.queryTodoList(); 164 this.queryTodoList();
...@@ -184,7 +174,7 @@ export default { ...@@ -184,7 +174,7 @@ export default {
184 queryTodoList () { 174 queryTodoList () {
185 getHomeTodoList().then(res => { 175 getHomeTodoList().then(res => {
186 if (res.result) { 176 if (res.result) {
187 this.todoList = res.result.slice(0, 5) 177 this.todoList = res.result
188 } 178 }
189 }) 179 })
190 }, 180 },
...@@ -204,7 +194,7 @@ export default { ...@@ -204,7 +194,7 @@ export default {
204 this.noticeList.forEach(item => { 194 this.noticeList.forEach(item => {
205 item.createtime = this._timedate(item.createtime) 195 item.createtime = this._timedate(item.createtime)
206 }) 196 })
207 this.policyList = res.result.policyList.slice(0, 5) 197 this.policyList = res.result.policyList
208 } 198 }
209 }) 199 })
210 }, 200 },
...@@ -252,7 +242,8 @@ export default { ...@@ -252,7 +242,8 @@ export default {
252 chart.line().position('year*value').size(2).shape('smooth'); 242 chart.line().position('year*value').size(2).shape('smooth');
253 chart.render(); 243 chart.render();
254 }, 244 },
255 handleNotice () { 245 handleNotice (item) {
246 console.log(item);
256 this.$alertMes('9999999999') 247 this.$alertMes('9999999999')
257 //setReadStatus({'bsmNotice':bsmNotice}) 248 //setReadStatus({'bsmNotice':bsmNotice})
258 } 249 }
......