Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web
Showing
16 changed files
with
150 additions
and
147 deletions
| ... | @@ -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 = { |
| ... | @@ -158,7 +147,7 @@ MessageBox.setDefaults = defaults => { | ... | @@ -158,7 +147,7 @@ MessageBox.setDefaults = defaults => { |
| 158 | MessageBox.defaults = defaults; | 147 | MessageBox.defaults = defaults; |
| 159 | }; | 148 | }; |
| 160 | 149 | ||
| 161 | MessageBox.alert = (message, title, options) => { | 150 | MessageBox.alert = (title, message, options) => { |
| 162 | if (typeof title === 'object') { | 151 | if (typeof title === 'object') { |
| 163 | options = title; | 152 | options = title; |
| 164 | title = ''; | 153 | title = ''; | ... | ... |
| 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"> |
| 8 | <slot> | 7 | <div class="el-message-box__container"> |
| 9 | <p>{{ message }}</p> | 8 | <div v-if="title !== ''" class="message-title">标题:{{ title }}</div> |
| 10 | </slot> | 9 | <div v-if="message !== ''" class="richText" v-html="message"></div> |
| 10 | </div> | ||
| 11 | </div> | 11 | </div> |
| 12 | <div class="el-message-box__btns"> | 12 | <div class="el-message-box__btns"> |
| 13 | <el-button :loading="cancelButtonLoading" :class="[cancelButtonClasses]" :round="roundButton" size="small" | 13 | <el-button :loading="cancelButtonLoading" :class="[cancelButtonClasses]" :round="roundButton" size="small" |
| ... | @@ -23,6 +23,8 @@ | ... | @@ -23,6 +23,8 @@ |
| 23 | <script type="text/babel"> | 23 | <script type="text/babel"> |
| 24 | import Popup from 'element-ui/src/utils/popup'; | 24 | import Popup from 'element-ui/src/utils/popup'; |
| 25 | import Locale from 'element-ui/src/mixins/locale'; | 25 | import Locale from 'element-ui/src/mixins/locale'; |
| 26 | import ElInput from 'element-ui/packages/input'; | ||
| 27 | import ElButton from 'element-ui/packages/button'; | ||
| 26 | import { addClass, removeClass } from 'element-ui/src/utils/dom'; | 28 | import { addClass, removeClass } from 'element-ui/src/utils/dom'; |
| 27 | import { t } from 'element-ui/src/locale'; | 29 | import { t } from 'element-ui/src/locale'; |
| 28 | import Dialog from 'element-ui/src/utils/aria-dialog'; | 30 | import Dialog from 'element-ui/src/utils/aria-dialog'; |
| ... | @@ -37,6 +39,7 @@ let typeMap = { | ... | @@ -37,6 +39,7 @@ let typeMap = { |
| 37 | 39 | ||
| 38 | export default { | 40 | export default { |
| 39 | mixins: [Popup, Locale], | 41 | mixins: [Popup, Locale], |
| 42 | |||
| 40 | props: { | 43 | props: { |
| 41 | modal: { | 44 | modal: { |
| 42 | default: true | 45 | default: true |
| ... | @@ -66,6 +69,12 @@ export default { | ... | @@ -66,6 +69,12 @@ export default { |
| 66 | type: Boolean | 69 | type: Boolean |
| 67 | } | 70 | } |
| 68 | }, | 71 | }, |
| 72 | |||
| 73 | components: { | ||
| 74 | ElInput, | ||
| 75 | ElButton | ||
| 76 | }, | ||
| 77 | |||
| 69 | computed: { | 78 | computed: { |
| 70 | icon () { | 79 | icon () { |
| 71 | const { type, iconClass } = this; | 80 | const { type, iconClass } = this; |
| ... | @@ -187,11 +196,6 @@ export default { | ... | @@ -187,11 +196,6 @@ export default { |
| 187 | visible (val) { | 196 | visible (val) { |
| 188 | if (val) { | 197 | if (val) { |
| 189 | this.uid++; | 198 | 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; | 199 | this.focusAfterClosed = document.activeElement; |
| 196 | messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFirstFocus()); | 200 | messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFirstFocus()); |
| 197 | } | 201 | } |
| ... | @@ -263,15 +267,15 @@ export default { | ... | @@ -263,15 +267,15 @@ export default { |
| 263 | } | 267 | } |
| 264 | }; | 268 | }; |
| 265 | </script> | 269 | </script> |
| 266 | <style scoped lang="scss"> | 270 | <style scoped> |
| 267 | .el-message-box__wrapper { | 271 | /deep/.message-title { |
| 268 | background: none; | 272 | font-size: 18px; |
| 273 | font-weight: 700; | ||
| 274 | margin-bottom: 5px; | ||
| 269 | } | 275 | } |
| 270 | .el-message-box { | 276 | |
| 271 | border: none; | 277 | /deep/.el-message-box__content img { |
| 272 | } | 278 | width: 100%; |
| 273 | .el-message-box__content { | 279 | height: 100%; |
| 274 | min-height: 150px; | ||
| 275 | padding-top: 30px; | ||
| 276 | } | 280 | } |
| 277 | </style> | 281 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -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> | ... | ... |
| ... | @@ -325,8 +325,7 @@ aside { | ... | @@ -325,8 +325,7 @@ aside { |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | .allow, | 327 | .allow, |
| 328 | .prohibit | 328 | .prohibit .suspend { |
| 329 | .suspend { | ||
| 330 | position: relative; | 329 | position: relative; |
| 331 | margin: 0 auto; | 330 | margin: 0 auto; |
| 332 | text-align: left; | 331 | text-align: left; |
| ... | @@ -380,6 +379,7 @@ aside { | ... | @@ -380,6 +379,7 @@ aside { |
| 380 | height: 5px; | 379 | height: 5px; |
| 381 | border-radius: 50%; | 380 | border-radius: 50%; |
| 382 | } | 381 | } |
| 382 | |||
| 383 | //错误日志样式 后期超优化 | 383 | //错误日志样式 后期超优化 |
| 384 | .item-cwnr { | 384 | .item-cwnr { |
| 385 | white-space: pre-wrap; | 385 | white-space: pre-wrap; |
| ... | @@ -390,3 +390,7 @@ aside { | ... | @@ -390,3 +390,7 @@ aside { |
| 390 | -webkit-line-clamp: 3; | 390 | -webkit-line-clamp: 3; |
| 391 | -webkit-box-orient: vertical; | 391 | -webkit-box-orient: vertical; |
| 392 | } | 392 | } |
| 393 | |||
| 394 | .item-cwnr img { | ||
| 395 | height: 30px; | ||
| 396 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -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,9 +242,8 @@ export default { | ... | @@ -252,9 +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) { |
| 256 | this.$alertMes('9999999999') | 246 | this.$alertMes(item.noticeTitle, item.noticeContent) |
| 257 | //setReadStatus({'bsmNotice':bsmNotice}) | ||
| 258 | } | 247 | } |
| 259 | } | 248 | } |
| 260 | } | 249 | } | ... | ... |
| ... | @@ -81,6 +81,12 @@ export default { | ... | @@ -81,6 +81,12 @@ export default { |
| 81 | }; | 81 | }; |
| 82 | }, | 82 | }, |
| 83 | created () { | 83 | created () { |
| 84 | var qllx = this.$route.query.sqywbm.substr(0,3) | ||
| 85 | if(qllx == 'A09'){ | ||
| 86 | this.title = '土地经营权登记信息' | ||
| 87 | }else{ | ||
| 88 | this.title = '农用地使用权登记信息' | ||
| 89 | } | ||
| 84 | this.loadData(); | 90 | this.loadData(); |
| 85 | }, | 91 | }, |
| 86 | methods: { | 92 | methods: { | ... | ... |
| ... | @@ -25,7 +25,6 @@ | ... | @@ -25,7 +25,6 @@ |
| 25 | </template> | 25 | </template> |
| 26 | 26 | ||
| 27 | <script> | 27 | <script> |
| 28 | import '@/styles/package/theme/index.scss' | ||
| 29 | import { addSysNotice } from "@/api/notice.js" | 28 | import { addSysNotice } from "@/api/notice.js" |
| 30 | import { upload } from "@/api/system.js" | 29 | import { upload } from "@/api/system.js" |
| 31 | export default { | 30 | export default { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <dialogBox title="新增系统通知" @submitForm="submitForm" saveButton="保存" :isFullscreen="false" width="60%" | 2 | <dialogBox title="新增系统通知" @submitForm="submitForm" saveButton="保存" :isFullscreen="false" width="50%" |
| 3 | @closeDialog="closeDialog" v-model="value"> | 3 | @closeDialog="closeDialog" v-model="value"> |
| 4 | <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules"> | 4 | <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules"> |
| 5 | <el-row> | 5 | <el-row> |
| 6 | <el-col :span="12"> | 6 | <el-col :span="24"> |
| 7 | <el-form-item label="通知标题:" prop="noticeTitle"> | 7 | <el-form-item label="通知标题:" prop="noticeTitle"> |
| 8 | <el-input v-model="ruleForm.noticeTitle"></el-input> | 8 | <el-input v-model="ruleForm.noticeTitle" class="width100"></el-input> |
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | </el-col> | 10 | </el-col> |
| 11 | </el-row> | 11 | </el-row> |
| 12 | <el-row> | 12 | <el-row> |
| 13 | <el-col :span="12"> | 13 | <el-col :span="24"> |
| 14 | <el-form-item label="通知来源:" prop="noticeSource"> | 14 | <el-form-item label="通知来源:" prop="noticeSource"> |
| 15 | <el-input v-model="ruleForm.noticeSource"></el-input> | 15 | <el-input v-model="ruleForm.noticeSource" class="width100"></el-input> |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | </el-col> | 17 | </el-col> |
| 18 | </el-row> | 18 | </el-row> |
| 19 | <el-row> | 19 | <el-row> |
| 20 | <el-col :span="24"> | ||
| 21 | <el-form-item label="通知内容:" prop="noticeContent"> | 20 | <el-form-item label="通知内容:" prop="noticeContent"> |
| 22 | <quill-editor | 21 | <quill-editor v-model="ruleForm.noticeContent" class="editor ql-editor" ref="myQuillEditor" |
| 23 | v-model="ruleForm.noticeContent" | 22 | :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)" |
| 24 | ref="myQuillEditor" | 23 | @change="onEditorChange($event)" @ready="onEditorReady($event)"></quill-editor> |
| 25 | :options="editorOption" | ||
| 26 | @blur="onEditorBlur($event)" | ||
| 27 | @focus="onEditorFocus($event)" | ||
| 28 | @change="onEditorChange($event)" | ||
| 29 | @ready="onEditorReady($event)" | ||
| 30 | > | ||
| 31 | </quill-editor> | ||
| 32 | <!-- <el-input v-model="ruleForm.noticeContent" type="textarea" :rows="16"></el-input> --> | ||
| 33 | </el-form-item> | 24 | </el-form-item> |
| 34 | </el-col> | ||
| 35 | </el-row> | 25 | </el-row> |
| 36 | <el-row> | 26 | <el-row> |
| 37 | <el-col :span="8"> | 27 | <el-col :span="8"> |
| 38 | <el-form-item label="附件:" prop="noticeFileUrl"> | 28 | <el-form-item label="附件:" prop="noticeFileUrl"> |
| 39 | <el-upload action="" multiple :auto-upload="false" :limit="1" | 29 | <el-upload action multiple :auto-upload="false" :limit="1" :on-change="handleChange" |
| 40 | :on-change="handleChange" :before-upload="beforeUpload"> | 30 | :before-upload="beforeUpload"> |
| 41 | <el-button icon="el-icon-upload" type="primary">上传</el-button> | 31 | <el-button icon="el-icon-upload" type="primary">上传</el-button> |
| 42 | <div slot="tip" class="el-upload__tip">文件大小不超过20MB</div> | 32 | <div slot="tip" class="el-upload__tip">文件大小不超过20MB</div> |
| 43 | </el-upload> | 33 | </el-upload> |
| ... | @@ -45,8 +35,8 @@ | ... | @@ -45,8 +35,8 @@ |
| 45 | </el-col> | 35 | </el-col> |
| 46 | </el-row> | 36 | </el-row> |
| 47 | <div v-show="false"> | 37 | <div v-show="false"> |
| 48 | <el-upload action="" multiple :auto-upload="false" | 38 | <el-upload action multiple :auto-upload="false" :on-change="RichTexthandleChange" :before-upload="beforeUpload" |
| 49 | :on-change="RichTexthandleChange" :before-upload="beforeUpload" class="richUpload"> | 39 | class="richUpload"> |
| 50 | <el-button icon="el-icon-upload" type="primary">上传</el-button> | 40 | <el-button icon="el-icon-upload" type="primary">上传</el-button> |
| 51 | <div slot="tip" class="el-upload__tip">文件大小不超过20MB</div> | 41 | <div slot="tip" class="el-upload__tip">文件大小不超过20MB</div> |
| 52 | </el-upload> | 42 | </el-upload> |
| ... | @@ -56,32 +46,32 @@ | ... | @@ -56,32 +46,32 @@ |
| 56 | </template> | 46 | </template> |
| 57 | 47 | ||
| 58 | <script> | 48 | <script> |
| 59 | import { addSysNotice } from "@/api/notice.js" | 49 | import { addSysNotice } from "@/api/notice.js"; |
| 60 | import { upload } from "@/api/system.js" | 50 | import { upload } from "@/api/system.js"; |
| 61 | import { quillEditor } from "vue-quill-editor"; | 51 | import { quillEditor } from "vue-quill-editor"; |
| 62 | export default { | 52 | export default { |
| 63 | props: { | 53 | props: { |
| 64 | value: { type: Boolean, default: false }, | 54 | value: { type: Boolean, default: false } |
| 65 | }, | 55 | }, |
| 66 | components: { quillEditor }, | 56 | components: { quillEditor }, |
| 67 | data () { | 57 | data () { |
| 68 | return { | 58 | return { |
| 69 | ruleForm: { | 59 | ruleForm: { |
| 70 | noticeTitle: '', | 60 | noticeTitle: "", |
| 71 | noticeContent: '', | 61 | noticeContent: "", |
| 72 | noticeFileUrl: '', | 62 | noticeFileUrl: "", |
| 73 | noticeSource: '', | 63 | noticeSource: "", |
| 74 | noticeType: '1' | 64 | noticeType: "1" |
| 75 | }, | 65 | }, |
| 76 | rules: { | 66 | rules: { |
| 77 | noticeTitle: [ | 67 | noticeTitle: [ |
| 78 | { required: true, message: '请输入通知标题', trigger: 'blur' } | 68 | { required: true, message: "请输入通知标题", trigger: "blur" } |
| 79 | ], | 69 | ], |
| 80 | noticeContent: [ | 70 | noticeContent: [ |
| 81 | { required: true, message: '请输入通知内容', trigger: 'blur' } | 71 | { required: true, message: "请输入通知内容", trigger: "blur" } |
| 82 | ], | 72 | ], |
| 83 | noticeSource: [ | 73 | noticeSource: [ |
| 84 | { required: true, message: '请输入通知来源', trigger: 'blur' } | 74 | { required: true, message: "请输入通知来源", trigger: "blur" } |
| 85 | ] | 75 | ] |
| 86 | }, | 76 | }, |
| 87 | // 富文本编辑器配置 | 77 | // 富文本编辑器配置 |
| ... | @@ -97,51 +87,62 @@ export default { | ... | @@ -97,51 +87,62 @@ export default { |
| 97 | [{ script: "sub" }, { script: "super" }], // 上标/下标 | 87 | [{ script: "sub" }, { script: "super" }], // 上标/下标 |
| 98 | [{ indent: "-1" }, { indent: "+1" }], // 缩进 | 88 | [{ indent: "-1" }, { indent: "+1" }], // 缩进 |
| 99 | [{ direction: "rtl" }], // 文本方向 | 89 | [{ direction: "rtl" }], // 文本方向 |
| 100 | [{ size: ['small', false, 'large', 'huge'] }], // 字体大小 | 90 | [{ size: ["small", false, "large", "huge"] }], // 字体大小 |
| 101 | [{ header: [1, 2, 3, 4, 5, 6] }], // 标题 | 91 | [{ header: [1, 2, 3, 4, 5, 6] }], // 标题 |
| 102 | [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 | 92 | [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 |
| 103 | // [{ font: ['songti'] }], // 字体种类 | 93 | // [{ font: ['songti'] }], // 字体种类 |
| 104 | [{ align: [] }], // 对齐方式 | 94 | [{ align: [] }], // 对齐方式 |
| 105 | ["clean"], // 清除文本格式 | 95 | ["clean"], // 清除文本格式 |
| 106 | ["image", "video"], // 链接、图片、视频 | 96 | ["image", "video"] // 链接、图片、视频 |
| 107 | ], | 97 | ], |
| 108 | handlers: { | 98 | handlers: { |
| 109 | image: function(value) { | 99 | image: function (value) { |
| 110 | if (value) { | 100 | if (value) { |
| 111 | // 用upload的点击事件代替文本编辑器的图片上传事件 | 101 | // 用upload的点击事件代替文本编辑器的图片上传事件 |
| 112 | document.querySelector('.richUpload input').click(); | 102 | document.querySelector(".richUpload input").click(); |
| 113 | } else { | 103 | } else { |
| 114 | this.quill.format('image', false); | 104 | this.quill.format("image", false); |
| 115 | } | 105 | } |
| 116 | } | 106 | } |
| 117 | } | 107 | } |
| 118 | } | 108 | } |
| 119 | }, | 109 | }, |
| 120 | placeholder: "请输入正文", | 110 | placeholder: "请输入正文" |
| 121 | }, | ||
| 122 | } | 111 | } |
| 123 | }, | 112 | }; |
| 124 | mounted() { | 113 | }, |
| 125 | // 自定义粘贴图片功能 | 114 | watch: { |
| 115 | value (val) { | ||
| 116 | if (val) { | ||
| 117 | let that = this | ||
| 118 | this.$nextTick(() => { | ||
| 119 | //创建富文本粘贴事件监听 | ||
| 126 | let quill = this.$refs.myQuillEditor.quill; | 120 | let quill = this.$refs.myQuillEditor.quill; |
| 127 | quill.root.addEventListener("paste",evt => { | 121 | this.$forceUpdate(); |
| 128 | console.log(1111); | 122 | quill.root.addEventListener( |
| 129 | if (evt.clipboardData && evt.clipboardData.files &&evt.clipboardData.files.length) { | 123 | "paste", |
| 130 | console.log(2222); | 124 | evt => { |
| 125 | if ( | ||
| 126 | evt.clipboardData && | ||
| 127 | evt.clipboardData.files && | ||
| 128 | evt.clipboardData.files.length | ||
| 129 | ) { | ||
| 131 | evt.preventDefault(); | 130 | evt.preventDefault(); |
| 132 | [].forEach.call(evt.clipboardData.files, file => { | 131 | [].forEach.call(evt.clipboardData.files, file => { |
| 133 | console.log(33333); | ||
| 134 | if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) { | 132 | if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) { |
| 135 | return; | 133 | return; |
| 136 | } | 134 | } |
| 137 | console.log(4444); | 135 | that.clipboardPictureChange(file); |
| 138 | this.RichTexthandleChange(File); | ||
| 139 | }); | 136 | }); |
| 140 | } | 137 | } |
| 141 | }, | 138 | }, |
| 142 | false | 139 | false |
| 143 | ); | 140 | ); |
| 141 | }); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | }, | 144 | }, |
| 145 | mounted () { }, | ||
| 145 | methods: { | 146 | methods: { |
| 146 | submitForm () { | 147 | submitForm () { |
| 147 | let that = this; | 148 | let that = this; |
| ... | @@ -149,14 +150,14 @@ export default { | ... | @@ -149,14 +150,14 @@ export default { |
| 149 | if (valid) { | 150 | if (valid) { |
| 150 | addSysNotice(this.ruleForm).then(res => { | 151 | addSysNotice(this.ruleForm).then(res => { |
| 151 | if (res.code == 200) { | 152 | if (res.code == 200) { |
| 152 | this.$message.success('保存成功') | 153 | this.$message.success("保存成功"); |
| 153 | this.$emit("input", false); | 154 | this.$emit("input", false); |
| 154 | this.resetRuleForm(); | 155 | this.resetRuleForm(); |
| 155 | this.$parent.queryClick(); | 156 | this.$parent.queryClick(); |
| 156 | } else { | 157 | } else { |
| 157 | this.$message.error(res.message) | 158 | this.$message.error(res.message); |
| 158 | } | 159 | } |
| 159 | }) | 160 | }); |
| 160 | } else { | 161 | } else { |
| 161 | // console.log('error submit!!'); | 162 | // console.log('error submit!!'); |
| 162 | return false; | 163 | return false; |
| ... | @@ -170,25 +171,32 @@ export default { | ... | @@ -170,25 +171,32 @@ export default { |
| 170 | }, | 171 | }, |
| 171 | // | 172 | // |
| 172 | resetRuleForm () { | 173 | resetRuleForm () { |
| 173 | this.$refs['ruleForm'].resetFields(); | 174 | this.$refs["ruleForm"].resetFields(); |
| 174 | this.ruleForm.noticeType = '1' | 175 | this.ruleForm.noticeType = "1"; |
| 175 | }, | 176 | }, |
| 176 | beforeUpload (file) { | 177 | beforeUpload (file) { |
| 177 | return true | 178 | return true; |
| 178 | }, | 179 | }, |
| 179 | //附件上传事件 | 180 | //附件上传事件 |
| 180 | async handleChange (file) { | 181 | async handleChange (file) { |
| 181 | var formdata = new FormData(); | 182 | var formdata = new FormData(); |
| 182 | formdata.append("file", file.raw); | 183 | formdata.append("file", file.raw); |
| 183 | upload(formdata).then(res => { | 184 | upload(formdata).then(res => { |
| 184 | this.ruleForm.noticeFileUrl = res.message | 185 | this.ruleForm.noticeFileUrl = res.message; |
| 185 | }) | 186 | }); |
| 186 | }, | 187 | }, |
| 187 | //富文本图片上传事件 | 188 | //富文本图片上传事件 |
| 188 | async RichTexthandleChange (file) { | 189 | RichTexthandleChange (file) { |
| 190 | this.uploadPicture(file.raw) | ||
| 191 | }, | ||
| 192 | //图片粘贴事件 | ||
| 193 | clipboardPictureChange (file) { | ||
| 194 | this.uploadPicture(file) | ||
| 195 | }, | ||
| 196 | uploadPicture (file) { | ||
| 189 | let that = this; | 197 | let that = this; |
| 190 | var formdata = new FormData(); | 198 | var formdata = new FormData(); |
| 191 | formdata.append("file", file.raw); | 199 | formdata.append("file", file); |
| 192 | upload(formdata).then(res => { | 200 | upload(formdata).then(res => { |
| 193 | //editor对象 | 201 | //editor对象 |
| 194 | const quill = that.$refs.myQuillEditor.quill; | 202 | const quill = that.$refs.myQuillEditor.quill; |
| ... | @@ -196,41 +204,48 @@ export default { | ... | @@ -196,41 +204,48 @@ export default { |
| 196 | // 获取光标所在位置 | 204 | // 获取光标所在位置 |
| 197 | const length = quill.selection.savedRange.index; | 205 | const length = quill.selection.savedRange.index; |
| 198 | // 插入图片 | 206 | // 插入图片 |
| 199 | quill.insertEmbed(length, 'image', res.message); | 207 | quill.insertEmbed(length, "image", res.message); |
| 200 | // 调整光标到最后 | 208 | // 调整光标到最后 |
| 201 | quill.setSelection(length + 1); | 209 | quill.setSelection(length + 1); |
| 202 | //that.quillUpdateImg = false; | 210 | //that.quillUpdateImg = false; |
| 203 | }) | 211 | }); |
| 204 | }, | 212 | }, |
| 205 | onSubmit() { | 213 | onSubmit () { |
| 206 | //console.log("submit!"); | 214 | //console.log("submit!"); |
| 207 | }, | 215 | }, |
| 208 | // 失去焦点事件 | 216 | // 失去焦点事件 |
| 209 | onEditorBlur(quill) { | 217 | onEditorBlur (quill) { |
| 210 | //console.log("editor blur!", quill); | 218 | //console.log("editor blur!", quill); |
| 211 | }, | 219 | }, |
| 212 | // 获得焦点事件 | 220 | // 获得焦点事件 |
| 213 | onEditorFocus(quill) { | 221 | onEditorFocus (quill) { |
| 214 | //console.log("editor focus!", quill); | 222 | //console.log("editor focus!", quill); |
| 215 | }, | 223 | }, |
| 216 | // 准备富文本编辑器 | 224 | // 准备富文本编辑器 |
| 217 | onEditorReady(quill) { | 225 | onEditorReady (quill) { |
| 218 | //console.log("editor ready!", quill); | 226 | //console.log("editor ready!", quill); |
| 219 | }, | 227 | }, |
| 220 | // 内容改变事件 | 228 | // 内容改变事件 |
| 221 | onEditorChange({ quill, html, text }) { | 229 | onEditorChange ({ quill, html, text }) { |
| 222 | //console.log("editor change!", quill, html, text); | 230 | //console.log("editor change!", quill, html, text); |
| 223 | //this.content = html; | 231 | //this.content = html; |
| 224 | }, | ||
| 225 | } | 232 | } |
| 226 | } | 233 | } |
| 234 | }; | ||
| 227 | </script> | 235 | </script> |
| 228 | <style scoped lang="scss"> | 236 | <style scoped lang="scss"> |
| 229 | // .ql-editor{ | 237 | .quill-editor { |
| 230 | // height:500px; | 238 | padding: 0; |
| 231 | // } | 239 | } |
| 232 | /deep/.ql-editor { | 240 | |
| 233 | padding: 0px; | 241 | .ql-editor { |
| 234 | height: 500px; | 242 | height: auto !important; |
| 243 | } | ||
| 244 | |||
| 245 | /deep/.ql-container { | ||
| 246 | padding: 0; | ||
| 247 | max-height: 400px; | ||
| 248 | min-height: 160px; | ||
| 249 | overflow-y: scroll; | ||
| 235 | } | 250 | } |
| 236 | </style> | 251 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -9,14 +9,9 @@ | ... | @@ -9,14 +9,9 @@ |
| 9 | <el-row :gutter="8"> | 9 | <el-row :gutter="8"> |
| 10 | <el-col :span="24" class="margin-top-middle"> | 10 | <el-col :span="24" class="margin-top-middle"> |
| 11 | 通知内容: | 11 | 通知内容: |
| 12 | <!-- <span v-html="formData.item.noticeContent"></span> --> | 12 | <quill-editor class="ql-editor" v-model="formData.item.noticeContent" ref="myQuillEditor" |
| 13 | <quill-editor class="ql-editor" | 13 | :options="editorOption"> |
| 14 | v-model="formData.item.noticeContent" | ||
| 15 | ref="myQuillEditor" | ||
| 16 | :options="editorOption" | ||
| 17 | > | ||
| 18 | </quill-editor> | 14 | </quill-editor> |
| 19 | <!-- <el-input type="textarea" :rows="20" v-model="formData.item.noticeContent"></el-input> --> | ||
| 20 | </el-col> | 15 | </el-col> |
| 21 | </el-row> | 16 | </el-row> |
| 22 | <el-row :gutter="8"> | 17 | <el-row :gutter="8"> |
| ... | @@ -63,6 +58,7 @@ export default { | ... | @@ -63,6 +58,7 @@ export default { |
| 63 | .margin-top-middle { | 58 | .margin-top-middle { |
| 64 | margin-top: 10px | 59 | margin-top: 10px |
| 65 | } | 60 | } |
| 61 | |||
| 66 | /deep/.ql-editor { | 62 | /deep/.ql-editor { |
| 67 | padding: 0px; | 63 | padding: 0px; |
| 68 | } | 64 | } | ... | ... |
| ... | @@ -53,6 +53,7 @@ export default { | ... | @@ -53,6 +53,7 @@ export default { |
| 53 | return { | 53 | return { |
| 54 | isDialog: false, | 54 | isDialog: false, |
| 55 | viewDialog: false, | 55 | viewDialog: false, |
| 56 | |||
| 56 | ruleForm: { | 57 | ruleForm: { |
| 57 | noticeTitle: '', | 58 | noticeTitle: '', |
| 58 | noticeStatus: '' | 59 | noticeStatus: '' | ... | ... |
| ... | @@ -28,7 +28,7 @@ class data extends filter { | ... | @@ -28,7 +28,7 @@ class data extends filter { |
| 28 | { | 28 | { |
| 29 | label: "通知内容", | 29 | label: "通知内容", |
| 30 | render: (h, scope) => { | 30 | render: (h, scope) => { |
| 31 | return <div class="item-cwnr">{scope.row.noticeContent}</div> | 31 | return <div class="item-cwnr" domPropsInnerHTML={scope.row.noticeContent}></div> |
| 32 | } | 32 | } |
| 33 | }, | 33 | }, |
| 34 | { | 34 | { | ... | ... |
| ... | @@ -15,11 +15,15 @@ export function queueDjywmc (djywbm) { | ... | @@ -15,11 +15,15 @@ export function queueDjywmc (djywbm) { |
| 15 | vm = "fwsyq"; | 15 | vm = "fwsyq"; |
| 16 | break; | 16 | break; |
| 17 | case "A23100"://农用地使用权(首次登记) | 17 | case "A23100"://农用地使用权(首次登记) |
| 18 | case "A09100"://土地经营权(首次登记) | ||
| 18 | vm = "nydsyq100"; | 19 | vm = "nydsyq100"; |
| 19 | break; | 20 | break; |
| 20 | case "A23200": | 21 | case "A23200": |
| 21 | case "A23300": | 22 | case "A23300": |
| 22 | case "A23400": | 23 | case "A23400": |
| 24 | case "A09200": | ||
| 25 | case "A09300": | ||
| 26 | case "A09400": | ||
| 23 | vm = "nydsyq200"; | 27 | vm = "nydsyq200"; |
| 24 | break; | 28 | break; |
| 25 | case "A05200": | 29 | case "A05200": | ... | ... |
-
Please register or sign in to post a comment