|
|
@@ -95,7 +95,6 @@
|
|
|
<div>{{ lookWorkData.name }}</div>
|
|
|
</div>
|
|
|
<div class="c_t15_wd_content">
|
|
|
- workId
|
|
|
<span>{{ lookWorkData.content.answer }}</span>
|
|
|
<div
|
|
|
class="c_t15_wd_c_imageList"
|
|
|
@@ -423,8 +422,8 @@ const setEchartsArea1 = () => {
|
|
|
axisLabel: {
|
|
|
color: 'rgba(0, 0, 0, 0.9)',
|
|
|
fontWeight: 600,
|
|
|
- fontSize: 18,
|
|
|
- lineHeight: 24,
|
|
|
+ fontSize: 17,
|
|
|
+ lineHeight: 20,
|
|
|
interval: 0,
|
|
|
formatter: function(value: any, idx: number) {
|
|
|
// 如果是字符串且格式为JSON(图片),则解析处理
|
|
|
@@ -437,6 +436,22 @@ const setEchartsArea1 = () => {
|
|
|
}
|
|
|
catch (e) {
|
|
|
// 非JSON字符串,直接返回
|
|
|
+ // 如果文本文字超过8个字,换行
|
|
|
+ if (typeof value === 'string') {
|
|
|
+ let displayValue = value
|
|
|
+ if (value.length > 20) {
|
|
|
+ displayValue = value.substr(0, 20) + '...'
|
|
|
+ }
|
|
|
+ // 8个字换行
|
|
|
+ let output = ''
|
|
|
+ for (let i = 0; i < displayValue.length; i += 8) {
|
|
|
+ output += displayValue.substr(i, 8)
|
|
|
+ if (i + 8 < displayValue.length) {
|
|
|
+ output += '\n'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return output
|
|
|
+ }
|
|
|
return value
|
|
|
}
|
|
|
return value
|
|
|
@@ -544,6 +559,7 @@ const setEchartsArea1 = () => {
|
|
|
watch(
|
|
|
() => props.showData,
|
|
|
(newVal, oldVal) => {
|
|
|
+ console.log('发生变化,showData')
|
|
|
if (
|
|
|
newVal &&
|
|
|
newVal.choiceQuestionListData[newVal.workIndex] &&
|
|
|
@@ -566,7 +582,26 @@ watch(
|
|
|
myChart.value = null
|
|
|
}
|
|
|
},
|
|
|
- { immediate: true }
|
|
|
+ { immediate: true, deep: true }
|
|
|
+)
|
|
|
+
|
|
|
+// 监听作业变化
|
|
|
+watch(
|
|
|
+ () => props.showData?.choiceQuestionListData,
|
|
|
+ (newVal) => {
|
|
|
+ console.log('choiceQuestionListData变化了')
|
|
|
+ if (
|
|
|
+ (newVal || newVal === 0) &&
|
|
|
+ props.showData.workDetail &&
|
|
|
+ props.showData.workDetail.type === '45'
|
|
|
+ ) {
|
|
|
+ setEchartsArea1()
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ myChart.value = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { deep: true }
|
|
|
)
|
|
|
|
|
|
// 监听作业变化
|
|
|
@@ -574,7 +609,7 @@ watch(
|
|
|
() => props.showData?.workIndex,
|
|
|
(newVal) => {
|
|
|
if (
|
|
|
- newVal &&
|
|
|
+ (newVal || newVal === 0) &&
|
|
|
props.showData.workDetail &&
|
|
|
props.showData.workDetail.type === '45'
|
|
|
) {
|
|
|
@@ -754,7 +789,7 @@ onUnmounted(() => {
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
display: grid;
|
|
|
- grid-template-columns: repeat(4, 1fr);
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
gap: 20px;
|
|
|
margin-top: 40px;
|
|
|
|
|
|
@@ -810,8 +845,7 @@ onUnmounted(() => {
|
|
|
}
|
|
|
.c_t15_workDetail {
|
|
|
width: 100%;
|
|
|
- flex: 1;
|
|
|
- min-height: 400px;
|
|
|
+ height: auto;
|
|
|
margin-top: 40px;
|
|
|
box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
|
|
|
box-sizing: border-box;
|
|
|
@@ -957,8 +991,7 @@ onUnmounted(() => {
|
|
|
}
|
|
|
.c_t72_workDetail {
|
|
|
width: 100%;
|
|
|
- flex: 1;
|
|
|
- min-height: 400px;
|
|
|
+ height: auto;
|
|
|
margin-top: 40px;
|
|
|
box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
|
|
|
box-sizing: border-box;
|
|
|
@@ -1143,8 +1176,7 @@ onUnmounted(() => {
|
|
|
}
|
|
|
.c_t73_workDetail {
|
|
|
width: 100%;
|
|
|
- flex: 1;
|
|
|
- min-height: 400px;
|
|
|
+ height: auto;
|
|
|
margin-top: 40px;
|
|
|
box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
|
|
|
box-sizing: border-box;
|