feat(Design): 新增矩阵题型和文件上传题型
- 新增矩阵题型组件和相关配置 - 新增文件上传题型组件和相关配置 -优化签名题型组件 - 添新的 CSS 样式类
This commit is contained in:
@@ -293,7 +293,6 @@ const actionEvent = (item, el) => {
|
||||
const actionFun = {
|
||||
// 单选事件 添加选项
|
||||
radioAddOption: (element) => {
|
||||
console.log(element);
|
||||
element.options.map((item) => {
|
||||
item.push({
|
||||
id: uuidv4(),
|
||||
@@ -313,6 +312,8 @@ const actionFun = {
|
||||
});
|
||||
});
|
||||
element.last_option_index += 1;
|
||||
|
||||
saveQueItem(questionInfo.value.logics, [element]);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -320,16 +321,59 @@ const actionFun = {
|
||||
* @param element {import('./components/Questions/types/martrix.js').MatrixSurveyQuestion}
|
||||
*/
|
||||
addMatrixRowOption: (element) => {
|
||||
const optionIndex = element.last_option_index;
|
||||
element.options[0].push({
|
||||
option: '新增行'
|
||||
cascade: [],
|
||||
config: [],
|
||||
is_fixed: 0,
|
||||
is_other: 0,
|
||||
is_remove_other: 0,
|
||||
option: `<p style="text-align:center">行标签${element.options[0].length + 1}</p>`,
|
||||
option_config: {
|
||||
image_url: [],
|
||||
title: '',
|
||||
instructions: [],
|
||||
option_type: 0,
|
||||
limit_right_content: '<p>右极文字1</p>'
|
||||
},
|
||||
parent_id: 0,
|
||||
type: 1,
|
||||
id: uuidv4(),
|
||||
option_index: optionIndex + 1
|
||||
});
|
||||
|
||||
element.last_option_index = optionIndex + 1;
|
||||
|
||||
saveQueItem(questionInfo.value.logics, [element]);
|
||||
},
|
||||
/**
|
||||
* martrix 矩阵列数增加
|
||||
* @param element {import('./components/Questions/types/martrix.js').MatrixSurveyQuestion}
|
||||
*/
|
||||
addMatrixColumnOption: (element) => {
|
||||
element.options[1].push({ option: '新增列' });
|
||||
const optionIndex = element.last_option_index;
|
||||
element.options[1].push({
|
||||
cascade: [],
|
||||
config: [],
|
||||
is_fixed: 0,
|
||||
is_other: 0,
|
||||
is_remove_other: 0,
|
||||
option: `<p style="text-align:center">列标签${element.options[1].length + 1}</p>`,
|
||||
option_config: {
|
||||
image_url: [],
|
||||
title: '',
|
||||
instructions: [],
|
||||
option_type: 0,
|
||||
limit_right_content: '<p>右极文字1</p>'
|
||||
},
|
||||
parent_id: 0,
|
||||
type: 2,
|
||||
id: uuidv4(),
|
||||
option_index: optionIndex + 1
|
||||
});
|
||||
|
||||
element.last_option_index = optionIndex + 1;
|
||||
saveQueItem(questionInfo.value.logics, [element]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user