Browse Source

Merge branch 'dev_ljj' of http://git.elinkit.com.cn:7070/r/tduck-front into dev_ljj

old
jiangyy 4 years ago
parent
commit
02c2e136f3
  1. 4
      package.json
  2. 4
      src/components/tinymce/index.vue
  3. 7
      src/router/index.js
  4. 31
      src/views/form/statistics/analysis.vue
  5. 2
      vue.config.js

4
package.json

@ -5,7 +5,7 @@
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build-dev": "vue-cli-service build --mode development --dest tduck-front",
"build-dev": "vue-cli-service build --mode development --dest questionnaire",
"preview": "node build/index.js --preview",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
@ -65,7 +65,7 @@
"not ie <= 8"
],
"lint-staged": {
},
"husky": {
"hooks": {

4
src/components/tinymce/index.vue

@ -41,8 +41,8 @@ export default {
selector: `#${this.tinymceId}`,
language: 'zh_CN',
menubar: 'false',
skin_url: '/tinymce/skins/ui/tduck',
content_css: '/tinymce/skins/content/tduck',
skin_url: '/questionnaire/tinymce/skins/ui/tduck',
content_css: '/questionnaire/tinymce/skins/content/tduck',
cache_suffix: '?v=0.0.1',
plugins,
toolbar,

7
src/router/index.js

@ -31,7 +31,8 @@ routes.push({
const router = new Router({
mode: 'history',
routes: routes.flat()
routes: routes.flat(),
base: '/questionnaire'
})
// 解决路由在 push/replace 了相同地址报错的问题
@ -46,11 +47,11 @@ Router.prototype.replace = function replace(location) {
router.beforeEach((to, from, next) => {
NProgress.start()
if (to.meta.requireLogin) {
if (to.query.token) {
console.log('ro.query', to.query)
localStorage.setItem('loginSource', 'epmet')
localStorage.setItem('customerId', to.query.customerId)
store.dispatch('user/getUserInfo', to.query.token)

31
src/views/form/statistics/analysis.vue

@ -61,12 +61,7 @@
</div>
</div>
</div>
<div
v-else-if="
item.type === 'RADIO' ||
item.type === 'CHECKBOX' ||
item.type === 'SELECT'
"
<div v-else-if="item.type === 'RADIO' || item.type === 'CHECKBOX' || item.type === 'SELECT'"
class="cell-wrapper"
>
<div v-for="(n, i) in item.detail.options" :key="i" class="cell">
@ -86,6 +81,24 @@
</div>
</div>
</div>
<div v-else-if="item.type === 'CASCADER'" class="cell-wrapper">
<div v-for="(n, i) in item.detail.profile" :key="i" class="cell">
<div class="cell-label">{{ i }}</div>
<div class="cell-value">
<div class="cell-progress">
<el-progress
:stroke-width="20"
:show-text="false"
:percentage="computedPercent(n, item.detail.totalCount)"
/>
</div>
<div class="cell-percent">
{{ computedPercent(n, item.detail.totalCount).toFixed(2) }}%
</div>
<div class="cell-num">{{ n }}</div>
</div>
</div>
</div>
</div>
<el-divider />
</div>
@ -298,10 +311,12 @@ export default {
async handleOpen(item) {
if (item.type === 'SWITCH' || item.type === 'NUMBER_INPUT') return false
this.dialogTitle = item.label
if (item.moduleType && item.moduleType === 'concat') {
this.dialogTitle = '联系人信息'
await this.getConcatList()
} else {
this.dialogTitle = item.label
this.dialogHeader.push(item)
await this.getInputList(item.formItemId, item.type)
}
@ -363,6 +378,8 @@ export default {
.cell-type {
padding-left: 10px;
font-size: 14px;
color: #409EFF;
cursor: pointer;
}
.cell-wrapper {
width: 100%;

2
vue.config.js

@ -7,7 +7,7 @@ function resolve(dir) {
}
module.exports = {
publicPath: '/',
publicPath: '/questionnaire',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {

Loading…
Cancel
Save