| @@ -21,7 +21,10 @@ import basicContainer from './components/basic-container/main' | |||||
| import api from './api' | import api from './api' | ||||
| import AvueUeditor from 'avue-plugin-ueditor' | import AvueUeditor from 'avue-plugin-ueditor' | ||||
| import './util/indexedDb/index' | import './util/indexedDb/index' | ||||
| import functions from './util/function' | |||||
| //全局防抖函数 | |||||
| Vue.use(functions) | |||||
| Vue.use(AvueUeditor); | Vue.use(AvueUeditor); | ||||
| import VueQuillEditor from 'vue-quill-editor' //vue-quill-editor其它文件可在应用页面直接引入 | import VueQuillEditor from 'vue-quill-editor' //vue-quill-editor其它文件可在应用页面直接引入 | ||||
| @@ -75,8 +78,6 @@ iconfontVersion.forEach(ele => { | |||||
| Vue.config.productionTip = false | Vue.config.productionTip = false | ||||
| import APlayer from '@moefe/vue-aplayer'; | import APlayer from '@moefe/vue-aplayer'; | ||||
| Vue.use(APlayer, { | Vue.use(APlayer, { | ||||
| productionTip: true, | productionTip: true, | ||||
| }); | }); | ||||
| @@ -0,0 +1,63 @@ | |||||
| let timeout = null | |||||
| let timer, flag | |||||
| /** | |||||
| * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数 | |||||
| * | |||||
| * @param {Function} func 要执行的回调函数 | |||||
| * @param {Number} wait 延时的时间 | |||||
| * @param {Boolean} immediate 是否立即执行 | |||||
| * @return null | |||||
| */ | |||||
| function debounce(func, params, wait = 1000, immediate = false) { | |||||
| // 清除定时器 | |||||
| if (timeout !== null) clearTimeout(timeout) | |||||
| // 立即执行,此类情况一般用不到 | |||||
| if (immediate) { | |||||
| var callNow = !timeout | |||||
| timeout = setTimeout(function () { | |||||
| timeout = null | |||||
| }, wait) | |||||
| if (callNow) typeof func === 'function' && func(params) | |||||
| } else { | |||||
| // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法 | |||||
| timeout = setTimeout(function () { | |||||
| typeof func === 'function' && func(params) | |||||
| }, wait) | |||||
| } | |||||
| } | |||||
| /** | |||||
| * 节流原理:在一定时间内,只能触发一次 | |||||
| * | |||||
| * @param {Function} func 要执行的回调函数 | |||||
| * @param {Number} wait 延时的时间 | |||||
| * @param {Boolean} immediate 是否立即执行 | |||||
| * @return null | |||||
| */ | |||||
| function throttle(func, params, wait = 500, immediate = true,) { | |||||
| if (immediate) { | |||||
| if (!flag) { | |||||
| flag = true | |||||
| // 如果是立即执行,则在wait毫秒内开始时执行 | |||||
| typeof func === 'function' && func(params) | |||||
| timer = setTimeout(() => { | |||||
| flag = false | |||||
| }, wait) | |||||
| } | |||||
| } else { | |||||
| if (!flag) { | |||||
| flag = true | |||||
| // 如果是非立即执行,则在wait毫秒内的结束处执行 | |||||
| timer = setTimeout(() => { | |||||
| flag = false | |||||
| typeof func === 'function' && func(params) | |||||
| }, wait) | |||||
| } | |||||
| } | |||||
| } | |||||
| export default { | |||||
| install(Vue) { | |||||
| Vue.prototype.$debounce = debounce | |||||
| Vue.prototype.$throttle = throttle | |||||
| } | |||||
| } | |||||
| @@ -2771,10 +2771,8 @@ export default { | |||||
| } | } | ||||
| .mydesc { | .mydesc { | ||||
| position: absolute; | |||||
| position: sticky; | |||||
| bottom: 0; | bottom: 0; | ||||
| left: 0; | |||||
| right: 0; | |||||
| padding: 0 10px; | padding: 0 10px; | ||||
| height: 40px; | height: 40px; | ||||
| border-top: 1px solid #ccc; | border-top: 1px solid #ccc; | ||||
| @@ -315,7 +315,7 @@ | |||||
| style="margin-left: 30px" | style="margin-left: 30px" | ||||
| type="primary" | type="primary" | ||||
| size="mini" | size="mini" | ||||
| @click="submitForm" | |||||
| @click="$debounce(submitForm)" | |||||
| >保存</el-button | >保存</el-button | ||||
| > | > | ||||
| </div> | </div> | ||||
| @@ -436,6 +436,7 @@ export default { | |||||
| .findByRepetitionName({ | .findByRepetitionName({ | ||||
| name: this.inparams.templateName, | name: this.inparams.templateName, | ||||
| houseId: this.houseId, | houseId: this.houseId, | ||||
| tempId: this.Templateid, | |||||
| }) | }) | ||||
| .then((res) => { | .then((res) => { | ||||
| if (res.code != 0) { | if (res.code != 0) { | ||||
| @@ -778,6 +779,7 @@ export default { | |||||
| window.history.back(); | window.history.back(); | ||||
| }, | }, | ||||
| submitForm() { | submitForm() { | ||||
| console.log('q23e') | |||||
| let list = this.newlist; | let list = this.newlist; | ||||
| if (list.length == 0) { | if (list.length == 0) { | ||||
| @@ -963,11 +965,12 @@ export default { | |||||
| }); | }); | ||||
| return; | return; | ||||
| } | } | ||||
| this.saveRate(params); | |||||
| this.saveRate(params) | |||||
| }, | }, | ||||
| // 评分保存 新增模板 | // 评分保存 新增模板 | ||||
| saveRate(params) { | saveRate(params) { | ||||
| console.log('调用') | |||||
| // if(!params.templateName) { | // if(!params.templateName) { | ||||
| // this.$message({ | // this.$message({ | ||||
| @@ -226,12 +226,12 @@ export default { | |||||
| minWidth: '100px', | minWidth: '100px', | ||||
| sortable: true, | sortable: true, | ||||
| }, | }, | ||||
| { | |||||
| label: "活跃顾问", | |||||
| prop: "activeAccount", | |||||
| minWidth: '100px', | |||||
| sortable: true, | |||||
| }, | |||||
| // { | |||||
| // label: "活跃顾问", | |||||
| // prop: "activeAccount", | |||||
| // minWidth: '100px', | |||||
| // sortable: true, | |||||
| // }, | |||||
| { | { | ||||
| label: "接待量", | label: "接待量", | ||||
| prop: "sumReception", | prop: "sumReception", | ||||
| @@ -107,7 +107,7 @@ | |||||
| </div> | </div> | ||||
| <div class="jinbox-box"> | <div class="jinbox-box"> | ||||
| <div class="boxbaifenbi" | <div class="boxbaifenbi" | ||||
| :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl1 + '%' }"> | |||||
| :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': (item.zxl1||0) + '%' }"> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="jinboxbott">{{ item.zxl }}</div> | <div class="jinboxbott">{{ item.zxl }}</div> | ||||