@wg-npm/survey-creator 0.3.377-8.develop → 0.3.496-8.release

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,180 +1,177 @@
1
1
  export default {
2
- survey_creator: {
3
- locale: "zh-CN",
4
- common: {
5
- back: "返回",
6
- save: "保存",
7
- copy: "复制",
8
- cancel: "取消",
9
- operation: "操作",
10
- delete: "删除",
11
- languages: {
12
- "zh-CN": "简体中文",
13
- "zh-TW": "繁体中文",
14
- "en-US": "English",
15
- },
16
- layout: {
17
- HORIZONTAL: "水平",
18
- VERTICAL: "垂直",
19
- },
20
- settings: {
21
- translate: "多语言翻译",
22
- preview: "预览",
23
- },
24
- tips: {
25
- edit: "编辑",
26
- copy: "复制",
27
- delete: "删除",
28
- please_input_answer: "请输入回答",
29
- },
30
- tab: {
31
- question_setting: "题目设置",
32
- language: "多语言翻译",
33
- },
34
- },
35
- survey: {
36
- question_count: "题目数",
37
- total_score: "总配分",
38
- layout: "布局",
39
- },
40
- question: {
41
- no_data: "还未创建题目",
42
- create: "新增题目",
43
- max_score: "最高分值:",
44
- star_single: "此题计星",
45
- star_multi_prefix: "当选择",
46
- star_multi_suffix: "项及以上时计星",
47
- type: "题型",
48
- types: {
49
- SINGLE_SELECTION: "单选题",
50
- MULTI_SELECTION: "多选题",
51
- FILL_BLANK: "填空题",
52
- SHORT_ANSWER: "简答题",
53
- MATRIX: "分数量表",
54
- TEXT_TITLE: "文字说明",
55
- EVALUATION: "统计题",
56
- },
57
- optional: "选项",
58
- sub_questions: "子题",
59
- score: "分值",
60
- scores: "分",
61
- questionRequired: "此题必填",
62
- titleRequiredTip: "请填写题目名称",
63
- textTitleRequiredTip: "请填写文字说明",
64
- scoreRequiredTip: "分值不能为空",
65
- subQuestionRequiredTip: "子題不能为空",
66
- optionalRequiredTip: "选项不能为空",
67
- commitRequiredTip: "描述不能为空",
68
- levelRequiredTip: "等级不能为空",
69
- addItem: "新增子题",
70
- noQuestion: "还未添加题目!",
71
- noQuestionTip: "新增题目请按右上角「新增题目按钮」",
72
- wordCountLimit: "字数限制",
73
- multi_selection: "多选题",
74
- single_selection: "单选题",
75
- remote_selection: "单选题",
76
- short_answer: "简答题",
77
- fill_blank: "填空题",
78
- matrix: "分数量表",
79
- text_title: "文字说明",
80
- group: "题组",
81
- level: "量表范围",
82
- matrixLevel1: "非常不同意",
83
- matrixLevel2: "不同意",
84
- matrixLevel3: "部分同意",
85
- matrixLevel4: "同意",
86
- matrixLevel5: "非常同意",
87
- scoreErrorTip: "分值只能填写1000以内两位小数",
88
- notEmpty: "不能为空",
89
- pleaseEnter: "请填写",
90
- wordsLimit: "字数限制:",
91
- noDesc: "无选项描述",
92
- noSubDesc: "暂无子题描述",
93
- noQuestionDesc: "暂无题目描述",
94
- unSave: "未保存",
95
- surveyConfirmContent: "确认要提交?提交后问卷即锁定不可再修改!",
96
- unSaveConfirm: "有未保存的题目,确定要返回吗?",
97
- scoringEnabled: "此题占分",
98
- starEnabled: "此题计星",
99
- optionalStarTip: "此项得星",
100
- starLeastOneTip: "至少一项得星",
101
- starMinCountPrefix: "当选择",
102
- starMinCountSuffix: "项及以上时计星",
103
- maxScore: "最高分值:",
104
- enableMultiSelect: "可复选",
105
- evaluation: {
106
- level: {
107
- "1": "好",
108
- "2": "较好",
109
- "3": "一般",
110
- "4": "较差",
111
- "5": "差",
2
+ survey_creator: {
3
+ locale: "zh-CN",
4
+ common: {
5
+ back: "返回",
6
+ save: "保存",
7
+ copy: "复制",
8
+ cancel: "取消",
9
+ operation: "操作",
10
+ delete: "删除",
11
+ languages: {
12
+ "zh-CN": "简体中文",
13
+ "zh-TW": "繁体中文",
14
+ "en-US": "English"
15
+ },
16
+ layout: {
17
+ HORIZONTAL: "水平",
18
+ VERTICAL: "垂直"
19
+ },
20
+ settings: {
21
+ translate: "多语言翻译",
22
+ preview: "预览"
23
+ },
24
+ tips: {
25
+ edit: "编辑",
26
+ copy: "复制",
27
+ delete: "删除",
28
+ please_input_answer: "请输入回答"
29
+ },
30
+ tab: {
31
+ question_setting: "题目设置",
32
+ language: "多语言翻译"
33
+ }
112
34
  },
113
- type: {
114
- STAR: "计星",
115
- EXPR: "条件判断",
35
+ survey: {
36
+ question_count: "题目数",
37
+ total_score: "总配分",
38
+ layout: "布局"
116
39
  },
117
- levelNameLabel: "评价等级",
118
- levelLabel: "评价标准",
119
- selectedType: "统计方式",
120
- desc: {
121
- atPoint: "{0}星",
122
- inRange: "{0}-{1}星",
123
- outOfRange: "{0}星以上",
40
+ question: {
41
+ no_data: "还未创建题目",
42
+ create: "新增题目",
43
+ max_score: "最高分值:",
44
+ star_single: "此题计星",
45
+ star_multi_prefix: "当选择",
46
+ star_multi_suffix: "项及以上时计星",
47
+ type: "题型",
48
+ types: {
49
+ SINGLE_SELECTION: "单选题",
50
+ MULTI_SELECTION: "多选题",
51
+ FILL_BLANK: "填空题",
52
+ SHORT_ANSWER: "简答题",
53
+ MATRIX: "分数量表",
54
+ TEXT_TITLE: "文字说明",
55
+ EVALUATION: "统计题",
56
+ },
57
+ optional: "选项",
58
+ sub_questions: "子题",
59
+ score: "分值",
60
+ scores: "分",
61
+ questionRequired: "此题必填",
62
+ titleRequiredTip: "请填写题目名称",
63
+ textTitleRequiredTip: "请填写文字说明",
64
+ scoreRequiredTip: "分值不能为空",
65
+ subQuestionRequiredTip: "子題不能为空",
66
+ optionalRequiredTip: "选项不能为空",
67
+ commitRequiredTip: "描述不能为空",
68
+ levelRequiredTip: "等级不能为空",
69
+ addItem: "新增子题",
70
+ noQuestion: "还未添加题目!",
71
+ noQuestionTip: "新增题目请按右上角「新增题目按钮」",
72
+ wordCountLimit: "字数限制",
73
+ multi_selection: "多选题",
74
+ single_selection: "单选题",
75
+ remote_selection: "单选题",
76
+ short_answer: "简答题",
77
+ fill_blank: "填空题",
78
+ matrix: "分数量表",
79
+ text_title: "文字说明",
80
+ group: "题组",
81
+ level: "量表范围",
82
+ matrixLevel1: "非常不同意",
83
+ matrixLevel2: "不同意",
84
+ matrixLevel3: "部分同意",
85
+ matrixLevel4: "同意",
86
+ matrixLevel5: "非常同意",
87
+ scoreErrorTip: "分值只能填写1000以内两位小数",
88
+ notEmpty: "不能为空",
89
+ pleaseEnter: "请填写",
90
+ wordsLimit: "字数限制:",
91
+ noDesc: "无选项描述",
92
+ noSubDesc: "暂无子题描述",
93
+ noQuestionDesc: "暂无题目描述",
94
+ unSave: "未保存",
95
+ surveyConfirmContent: "确认要提交?提交后问卷即锁定不可再修改!",
96
+ unSaveConfirm: "有未保存的题目,确定要返回吗?",
97
+ scoringEnabled: "此题占分",
98
+ starEnabled: "此题计星",
99
+ optionalStarTip: "此项得星",
100
+ starLeastOneTip: "至少一项得星",
101
+ starMinCountPrefix: "当选择",
102
+ starMinCountSuffix: "项及以上时计星",
103
+ maxScore: "最高分值:",
104
+ enableMultiSelect: "可复选",
105
+ evaluation: {
106
+ level: {
107
+ "1": "好",
108
+ "2": "较好",
109
+ "3": "一般",
110
+ "4": "较差",
111
+ "5": "差",
112
+ },
113
+ type: {
114
+ STAR: "计星",
115
+ EXPR: "条件判断"
116
+ },
117
+ levelNameLabel: "评价等级",
118
+ levelLabel: "评价标准",
119
+ selectedType: "统计方式",
120
+ desc: {
121
+ atPoint: "{0}星",
122
+ inRange: "{0}-{1}星",
123
+ outOfRange: "{0}星以上"
124
+ },
125
+ condition: {
126
+ if: "如果",
127
+ else: "否则",
128
+ add_if_template: "添加如果模板",
129
+ requirements: "满足条件",
130
+ type: {
131
+ ASSIGN: "题目范围为__的结果为__的数量__",
132
+ AUTO: "题目范围为__的结果为__"
133
+ },
134
+ evaluation_label: "设置总体评价为",
135
+ evaluation_require_tip: "总体评价不能为空",
136
+ question: "题目",
137
+ question_scope: "题目范围",
138
+ question_result: "的结果为",
139
+ question_count: "的数量",
140
+ choose_result: "选择结果",
141
+ operator: "运算符",
142
+ other: "其他",
143
+ assign_template: `{0} 项为 {1} {2} {3}项`,
144
+ auto_template: `{0} 项为 {1}`
145
+ }
146
+ },
124
147
  },
125
- condition: {
126
- if: "如果",
127
- else: "否则",
128
- add_if_template: "添加如果模板",
129
- requirements: "满足条件",
130
- score_condition_title: "总分数范围为",
131
- type: {
132
- ASSIGN: "题目范围为__的结果为__的数量__",
133
- AUTO: "题目范围为__的结果为__",
134
- SCORE: "总分数范围为__",
135
- },
136
- evaluation_label: "设置总体评价为",
137
- evaluation_require_tip: "总体评价不能为空",
138
- question: "题目",
139
- question_scope: "题目范围",
140
- question_result: "的结果为",
141
- question_count: "的数量",
142
- choose_result: "选择结果",
143
- operator: "运算符",
144
- other: "其他",
145
- assign_template: `{0} 项为 {1} {2} {3}项`,
146
- auto_template: `{0} 项为 {1}`,
147
- score_template: `总分数范围为: {0}分{1}, {2}分`,
148
+ page: {
149
+ question: "题目",
150
+ textTitle: "说明",
151
+ subQuestion: "子题",
152
+ matrixQuestion: "主题标题",
153
+ count: "题目数",
154
+ arrangement: "选项排列",
155
+ horizontal: "横向",
156
+ vertical: "纵向",
157
+ totalScore: "总配分"
148
158
  },
149
- },
150
- },
151
- page: {
152
- question: "题目",
153
- textTitle: "说明",
154
- subQuestion: "子题",
155
- matrixQuestion: "主题标题",
156
- count: "题目数",
157
- arrangement: "选项排列",
158
- horizontal: "横向",
159
- vertical: "纵向",
160
- totalScore: "总配分",
161
- },
162
- translator: {
163
- save: "保存",
164
- cancel: "取消",
165
- table: {
166
- header_type: "类型",
167
- header_primary_name: "(默认语言)",
168
- header_zhCn: "简体中文",
169
- header_enUs: "English",
170
- header_zhTw: "繁体中文",
171
- },
172
- },
173
- message: {
174
- saveSuccess: "保存成功",
175
- saveFailed: "保存失败",
176
- surveyLocaleNoSettingCompleted: "问卷题目翻译不完全,是否继续?",
177
- noSettingLocale: "未设置多国语言!",
178
- },
179
- },
159
+ translator: {
160
+ save: "保存",
161
+ cancel: "取消",
162
+ table: {
163
+ header_type: "类型",
164
+ header_primary_name: "(默认语言)",
165
+ header_zhCn: "简体中文",
166
+ header_enUs: "English",
167
+ header_zhTw: "繁体中文",
168
+ }
169
+ },
170
+ message: {
171
+ saveSuccess: "保存成功",
172
+ saveFailed: "保存失败",
173
+ surveyLocaleNoSettingCompleted: "问卷题目翻译不完全,是否继续?",
174
+ noSettingLocale: "未设置多国语言!",
175
+ }
176
+ }
180
177
  };
@@ -189,11 +189,20 @@
189
189
 
190
190
  .card-content {
191
191
  text-align: center;
192
+ .ivu-tooltip {
193
+ display: unset;
194
+ }
195
+ .ivu-tooltip-rel{
196
+ display: unset;
197
+ }
192
198
 
193
199
  .text {
194
200
  font-weight: 500;
195
201
  font-size: 18px;
196
202
  padding: 10px;
203
+ white-space: nowrap;/*把文本强制显示在一行*/
204
+ overflow: hidden;/*隐藏超出部分的文字*/
205
+ text-overflow: ellipsis;/*超出显示省略号*/
197
206
  }
198
207
  }
199
208
  }
@@ -132,10 +132,20 @@
132
132
  .card-content {
133
133
  text-align: center;
134
134
 
135
+ .ivu-tooltip {
136
+ display: unset;
137
+ }
138
+ .ivu-tooltip-rel{
139
+ display: unset;
140
+ }
141
+
135
142
  .text {
136
143
  font-weight: 500;
137
144
  font-size: 18px;
138
145
  padding: 10px;
146
+ white-space: nowrap;/*把文本强制显示在一行*/
147
+ overflow: hidden;/*隐藏超出部分的文字*/
148
+ text-overflow: ellipsis;/*超出显示省略号*/
139
149
  }
140
150
  }
141
151
  }
@@ -1,135 +0,0 @@
1
- <template>
2
- <Row type="flex" justify="start" :gutter="6" align="middle">
3
- <Col class="label">
4
- {{
5
- t("survey_creator.question.evaluation.condition.score_condition_title")
6
- }}
7
- </Col>
8
- <Col :span="3">
9
- <FormItem
10
- :prop="`evaluationItems[${itemIndex}].conditions[${index}].payload.minScore`"
11
- :rules="{
12
- required: true,
13
- type: 'number',
14
- trigger: 'change',
15
- min: 0,
16
- max: this.totalScore,
17
- message: t('分值不能为空'),
18
- }"
19
- >
20
- <InputNumber
21
- v-model="value.minScore"
22
- :min="0"
23
- :max="value.maxScore"
24
- @on-change="rangeChange"
25
- ></InputNumber>
26
- </FormItem>
27
- </Col>
28
- <Col class="label">
29
- {{ t("survey_creator.question.scores") }}
30
- </Col>
31
- <Col :span="3">
32
- <FormItem
33
- :prop="`evaluationItems[${itemIndex}].conditions[${index}].payload.operator`"
34
- :rules="{
35
- required: true,
36
- trigger: 'change',
37
- message: t('survey_creator.question.notEmpty'),
38
- }"
39
- >
40
- <Select
41
- v-model="value.operator"
42
- :placeholder="
43
- t('survey_creator.question.evaluation.condition.operator')
44
- "
45
- >
46
- <Option
47
- v-for="(operator, index) in operators"
48
- :value="operator"
49
- :key="index"
50
- >
51
- {{ operator }}
52
- </Option>
53
- </Select>
54
- </FormItem>
55
- </Col>
56
- <Col :span="3">
57
- <FormItem
58
- :prop="`evaluationItems[${itemIndex}].conditions[${index}].payload.maxScore`"
59
- :rules="{
60
- required: true,
61
- type: 'number',
62
- trigger: 'change',
63
- min: 0,
64
- max: this.totalScore,
65
- message: t('分值不能为空'),
66
- }"
67
- >
68
- <InputNumber
69
- v-model="value.maxScore"
70
- :min="value.minScore"
71
- :max="totalScore"
72
- @on-change="rangeChange"
73
- ></InputNumber>
74
- </FormItem>
75
- </Col>
76
- <Col class="label">
77
- {{ t("survey_creator.question.scores") }}
78
- </Col>
79
- </Row>
80
- </template>
81
- <script lang="ts">
82
- import Vue from "vue";
83
- import { Row, Col, Select, Option, FormItem, InputNumber } from "view-design";
84
- import _ from "lodash";
85
- import ExprMixin from "./expr-mixin";
86
- import LocaleMixin from "../../../../../mixins/locale-mixin";
87
-
88
- export default Vue.extend({
89
- name: "score",
90
- mixins: [ExprMixin, LocaleMixin],
91
- components: {
92
- Row,
93
- Col,
94
- Select,
95
- Option,
96
- FormItem,
97
- InputNumber,
98
- },
99
- data() {
100
- return {
101
- operators: ["<=", "<"],
102
- };
103
- },
104
- computed: {
105
- totalScore() {
106
- return this.$rootComponent.currentSurvey.statistics.maxScore;
107
- },
108
- },
109
- methods: {
110
- generateExpr() {
111
- // let ids = `${_.map(this.value.scope, (e) => {
112
- // return `"` + e + `"`;
113
- // })}`;
114
- // let answers = `${_.map(this.value.values, (e) => {
115
- // return `"` + e + `"`;
116
- // })}`;
117
- // return `$count($[id in [${ids}]][answer in [${answers}]]) = ${_.size(
118
- // this.value.scope
119
- // )}`;
120
- let minScore = this.value.minScore;
121
- let maxScore = this.value.maxScore;
122
- return `$totalScore ${minScore} ${this.value.operator} ${maxScore}`;
123
- },
124
- rangeChange() {
125
- console.log("222");
126
- },
127
- },
128
- });
129
- </script>
130
- <style scoped lang="less">
131
- .label {
132
- text-align: right;
133
- margin-bottom: 24px;
134
- }
135
- </style>