|
@@ -42,9 +42,10 @@
|
|
|
v-for="(item, index) in dialogTagList"
|
|
|
:key="item.value"
|
|
|
:index="index"
|
|
|
+ :dialogTagList="dialogTagList"
|
|
|
:maxIndex="dialogTagList.length - 1"
|
|
|
@updateMessage="updateMessage"
|
|
|
- :ref="`analysis${item.value}`"
|
|
|
+ :ref="`analysis_${item.value}`"
|
|
|
:showBrief="showBrief"
|
|
|
@delItem="delAnalysisItem"
|
|
|
@editItem="editAnalysisItem"
|
|
@@ -53,6 +54,7 @@
|
|
|
@addNewAnalysisGroup="addNewAnalysisGroup"
|
|
|
@delAnalysisGroup="delAnalysisGroup"
|
|
|
@setTheLocation="setTheLocation"
|
|
|
+ @moveAnalysis="moveAnalysis"
|
|
|
:dataList="dataList.filter(i => !(item.value == 0 && i.tIndex == 2))"
|
|
|
:bmData="bmData.jsonData"
|
|
|
:title="item.name"
|
|
@@ -65,207 +67,10 @@
|
|
|
:type="item.value"
|
|
|
:tid="tid"
|
|
|
:fileId="fileId"
|
|
|
+ :isDrag="isDrag"
|
|
|
v-loading="item.loading"
|
|
|
/>
|
|
|
-
|
|
|
- <!-- <div class="ma_m_addNewAnalysisBox"></div> -->
|
|
|
-
|
|
|
- <!-- <analysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- ref="analysis0"
|
|
|
- :showBrief="showBrief"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- @saveItem="saveAnalysis"
|
|
|
- :bmData="bmData.jsonData"
|
|
|
- title="通用课堂分析"
|
|
|
- :dialogTagDataList="dialogTagDataList"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 0 && i.tIndex!=2)"
|
|
|
- :type="0"
|
|
|
- :tid="tid"
|
|
|
- :fileId="fileId"
|
|
|
- v-loading="currencyLoading"
|
|
|
- />
|
|
|
- <analysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- ref="analysis1"
|
|
|
- :showBrief="showBrief"
|
|
|
- :bmData="bmData.jsonData"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- @saveItem="saveAnalysis"
|
|
|
- title="学科课堂分析"
|
|
|
- :dialogTagDataList="dialogTagDataList"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 1)"
|
|
|
- :type="1"
|
|
|
- :tid="tid"
|
|
|
- :fileId="fileId"
|
|
|
- v-loading="scienceLoading"
|
|
|
- />
|
|
|
- <analysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- ref="analysis2"
|
|
|
- :bmData="bmData.jsonData"
|
|
|
- :showBrief="showBrief"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- @saveItem="saveAnalysis"
|
|
|
- title="扩展分析"
|
|
|
- :dialogTagDataList="dialogTagDataList"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 2)"
|
|
|
- :type="2"
|
|
|
- :tid="tid"
|
|
|
- :fileId="fileId"
|
|
|
- v-loading="extendLoading"
|
|
|
- /> -->
|
|
|
- <!-- <analysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- ref="analysis3"
|
|
|
- :showBrief="showBrief"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- title="增值性分析"
|
|
|
- :dialogTagDataList="dialogTagDataList"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 3)"
|
|
|
- :type="3"
|
|
|
- :tid="tid"
|
|
|
- :fileId="fileId"
|
|
|
- v-loading="valueAddedLoading"
|
|
|
- /> -->
|
|
|
- <!-- <currencyAnalysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 0)"
|
|
|
- :tid="tid"
|
|
|
- v-loading="currencyLoading"
|
|
|
- ref="currencyAnalysisRef"
|
|
|
- />
|
|
|
-
|
|
|
- <scienceAnalysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 1)"
|
|
|
- :tid="tid"
|
|
|
- v-loading="scienceLoading"
|
|
|
- ref="scienceAnalysisRef"
|
|
|
- />
|
|
|
-
|
|
|
- <extendAnalysis
|
|
|
- @updateMessage="updateMessage"
|
|
|
- @delItem="delAnalysisItem"
|
|
|
- @editItem="editAnalysisItem"
|
|
|
- :analysisItemList="dataList.filter((i) => i.Type === 2)"
|
|
|
- :tid="tid"
|
|
|
- v-loading="extendLoading"
|
|
|
- ref="extendAnalysisRef"
|
|
|
- /> -->
|
|
|
- <!-- <div style="height: 10000px;"></div> -->
|
|
|
</div>
|
|
|
- <!-- <el-dialog
|
|
|
- :center="true"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- width="1200px"
|
|
|
- class="addTemplateDialog"
|
|
|
- >
|
|
|
- <div class="a-d-top">
|
|
|
- <div class="a-d-topTit"><div style="width: 136px">添加模块</div></div>
|
|
|
- <div>
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- prefix-icon="el-icon-search"
|
|
|
- v-model="input2"
|
|
|
- clearable
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div class="a-d-t-right">
|
|
|
- <span @click.stop="dialogVisible = false">×</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="display: flex; height: 100%">
|
|
|
- <div class="a-d-t-left">
|
|
|
- <div
|
|
|
- :style="
|
|
|
- tagIndex == index
|
|
|
- ? 'background: rgba(226, 238, 255, 1);color: rgba(54, 129, 252, 1)'
|
|
|
- : ''
|
|
|
- "
|
|
|
- class="a-d-t-l-item"
|
|
|
- v-for="(item, index) in dialogTagList"
|
|
|
- :key="item.id"
|
|
|
- @click.stop="tagIndex = index"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="a-d-box">
|
|
|
- <div
|
|
|
- style="
|
|
|
- font-family: PingFang SC;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- line-height: 22px;
|
|
|
- text-align: left;
|
|
|
- margin: 20px 0;
|
|
|
- margin-bottom: 10px;
|
|
|
- "
|
|
|
- >
|
|
|
- 推荐
|
|
|
- </div>
|
|
|
- <div class="a-d-b-subject">
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- 'a_d_b_s_btn',
|
|
|
- tagSubject == item ? 'a_d_b_s_ActiveBtn' : '',
|
|
|
- ]"
|
|
|
- v-for="(item, index) in tagSubjectList"
|
|
|
- :key="index + '-' + tagIndex"
|
|
|
- @click.stop="tagSubject = item"
|
|
|
- >{{ item }}</span
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div style="display: flex; flex-wrap: wrap">
|
|
|
- <div
|
|
|
- class="a-d-b-item"
|
|
|
- v-for="(item, index) in searchDataList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div class="a-d-b-i-top">
|
|
|
- <img
|
|
|
- style="height: 22px; width: 22px"
|
|
|
- :src="
|
|
|
- require('../../../../assets/icon/classroomObservation/digImg.svg')
|
|
|
- "
|
|
|
- />
|
|
|
- <div class="a-d-b-i-t-title">{{ item.name }}</div>
|
|
|
- </div>
|
|
|
- <div class="a-d-b-i-bottom">{{ item.detail }}</div>
|
|
|
- <div class="a-d-b-i-bottomPer" style="display: block">
|
|
|
- {{ item.count }}人已使用
|
|
|
- </div>
|
|
|
- <div class="a-d-b-i-bottomBtn" style="display: none">
|
|
|
- <div
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
- justify-content: space-around;
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- class="a-d-b-i-t-btn1"
|
|
|
- @click="addAnalysisItem(item.name)"
|
|
|
- >
|
|
|
- 添加
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-dialog> -->
|
|
|
<!-- 添加模块 -->
|
|
|
<addNewAnalysisDialog
|
|
|
@update="getDialogTagDataList"
|
|
@@ -358,7 +163,9 @@ export default {
|
|
|
dialogTagDataList: [],
|
|
|
bmData: {},
|
|
|
dataList: [],
|
|
|
- imageList: {}
|
|
|
+ imageList: {},
|
|
|
+ isDrag: false,
|
|
|
+ copyDataList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -387,6 +194,11 @@ export default {
|
|
|
// },
|
|
|
},
|
|
|
watch: {
|
|
|
+ isDrag(newValue) {
|
|
|
+ if (newValue) {
|
|
|
+ this.copyDataList = JSON.parse(JSON.stringify(this.dataList));
|
|
|
+ }
|
|
|
+ }
|
|
|
// tagIndex() {
|
|
|
// this.tagSubject = "";
|
|
|
// },
|
|
@@ -560,7 +372,7 @@ export default {
|
|
|
// } else if (_result.Type == 2) {
|
|
|
// this.$refs.analysis2[0].getReport(_result.id);
|
|
|
// }
|
|
|
- this.$refs[`analysis${_result.Type}`][0].getReport(_result.id);
|
|
|
+ this.$refs[`analysis_${_result.Type}`][0].getReport(_result.id);
|
|
|
this.$message.success("添加成功");
|
|
|
resolve();
|
|
|
} else {
|
|
@@ -926,6 +738,7 @@ export default {
|
|
|
getData(arr = []) {
|
|
|
return new Promise(resolve => {
|
|
|
this.dataList = [];
|
|
|
+ this.isDrag = false;
|
|
|
this.$forceUpdate();
|
|
|
if (this.tid) {
|
|
|
return this.getAnalysisData(0).then(res => {
|
|
@@ -939,8 +752,8 @@ export default {
|
|
|
promises.push(this.getAnalysisData(i.value));
|
|
|
});
|
|
|
Promise.all(promises).then(res => {
|
|
|
- this.dataList.sort((a,b)=>a.tIndex - b.tIndex);
|
|
|
- this.dataList.sort((a,b)=>a.Type - b.Type)
|
|
|
+ this.dataList.sort((a, b) => a.tIndex - b.tIndex);
|
|
|
+ this.dataList.sort((a, b) => a.Type - b.Type);
|
|
|
resolve();
|
|
|
});
|
|
|
});
|
|
@@ -1165,7 +978,7 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.dialogTagList.forEach(i => {
|
|
|
- this.$refs[`analysis${i.value}`][0].getReport();
|
|
|
+ this.$refs[`analysis_${i.value}`][0].getReport();
|
|
|
});
|
|
|
// this.$refs["analysis0"][0].getReport();
|
|
|
// this.$refs["analysis1"][0].getReport();
|
|
@@ -1363,22 +1176,22 @@ export default {
|
|
|
if (_index === -1) return; // 如果没找到,直接退出
|
|
|
if (data.type == 0) {
|
|
|
// 置顶
|
|
|
- moveList = this.moveListFn(moveList, _index, 0)
|
|
|
+ moveList = this.moveListFn(moveList, _index, 0);
|
|
|
} else if (data.type == 1) {
|
|
|
// 置底
|
|
|
- moveList = this.moveListFn(moveList, _index, moveList.length-1)
|
|
|
+ moveList = this.moveListFn(moveList, _index, moveList.length - 1);
|
|
|
} else if (data.type == 2) {
|
|
|
// 上移
|
|
|
- moveList = this.moveListFn(moveList, _index, _index-1)
|
|
|
+ moveList = this.moveListFn(moveList, _index, _index - 1);
|
|
|
} else if (data.type == 3) {
|
|
|
// 下移
|
|
|
- moveList = this.moveListFn(moveList, _index, _index+1)
|
|
|
+ moveList = this.moveListFn(moveList, _index, _index + 1);
|
|
|
}
|
|
|
this.dialogTagList = moveList;
|
|
|
- this.bmData.jsonData["dialogTagList"] = this.dialogTagList;
|
|
|
- this.saveData(this.bmData)
|
|
|
- this.$forceUpdate()
|
|
|
- },
|
|
|
+ this.bmData.jsonData["dialogTagList"] = this.dialogTagList;
|
|
|
+ this.saveData(this.bmData);
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
moveListFn(arr, fromIndex, toIndex) {
|
|
|
// 确保索引在数组范围内
|
|
|
if (
|
|
@@ -1394,6 +1207,67 @@ export default {
|
|
|
}
|
|
|
return arr;
|
|
|
},
|
|
|
+ moveArrayElement(arr, fromIndex, toIndex) {
|
|
|
+ const element = arr[fromIndex];
|
|
|
+ arr.splice(fromIndex, 1); // 删除原位置的元素
|
|
|
+
|
|
|
+ // 调整目标下标以确保正确插入
|
|
|
+ const newIndex = toIndex < fromIndex ? toIndex : toIndex - 1;
|
|
|
+
|
|
|
+ arr.splice(newIndex, 0, element); // 插入到新位置
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
+ moveAnalysis(data) {
|
|
|
+ let _form = data.form.split("_");
|
|
|
+ let _to = data.to.split("_");
|
|
|
+
|
|
|
+ if (_form[0] === _to[0] && _form[1] === _to[1] && _form[2] === _to[2])
|
|
|
+ return console.log("位置不变");
|
|
|
+ if (
|
|
|
+ _form[0] === _to[0] &&
|
|
|
+ parseInt(_form[1]) - 1 === parseInt(_to[1]) &&
|
|
|
+ _to[3] == "1"
|
|
|
+ )
|
|
|
+ return console.log("位置不变2");
|
|
|
+ let _formIndex = this.dataList.findIndex(
|
|
|
+ i => i.Type == parseInt(_form[0]) && i.tIndex == parseInt(_form[2])
|
|
|
+ );
|
|
|
+ let _toIndex = -1;
|
|
|
+ if (["0", "1"].includes(_to[3])) {
|
|
|
+ _toIndex = this.dataList.findIndex(
|
|
|
+ i => i.Type == parseInt(_to[0]) && i.tIndex == parseInt(_to[2])
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // 更新Type与tIndex
|
|
|
+ this.dataList[_formIndex].Type = parseInt(_to[0]);
|
|
|
+ if (_to[3] === "1") {
|
|
|
+ //下面
|
|
|
+ this.moveArrayElement(this.dataList, _formIndex, _toIndex+1);
|
|
|
+ } else if (_to[3] === "0") {
|
|
|
+ //上面
|
|
|
+ this.moveArrayElement(this.dataList, _formIndex, _toIndex);
|
|
|
+ } else if (_to[3] === "2") {
|
|
|
+ console.log("移到了空模块");
|
|
|
+ }
|
|
|
+
|
|
|
+ this.dialogTagList.forEach(i => {
|
|
|
+ let _data = this.dataList.filter(i2 => i2.Type === i.value);
|
|
|
+ let _fTIndex = i.value === 0 ? 2 : 0;
|
|
|
+ _data.forEach(i3 => {
|
|
|
+ if (this.dataList.find(i4 => i4.id === i3.id).tIndex != _fTIndex) {
|
|
|
+ this.dataList.find(i4 => i4.id === i3.id).tIndex = _fTIndex;
|
|
|
+ }
|
|
|
+ _fTIndex++;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.$forceUpdate();
|
|
|
+ console.log("更换成功");
|
|
|
+ },
|
|
|
+ moveAnalysisCancel() {
|
|
|
+ this.isDrag = false;
|
|
|
+ this.dataList = JSON.parse(JSON.stringify(this.copyDataList));
|
|
|
+ this.copyDataList = [];
|
|
|
+ },
|
|
|
init() {
|
|
|
this.bmData = {};
|
|
|
this.getDefaultData();
|
|
@@ -1460,6 +1334,7 @@ export default {
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 123px);
|
|
|
overflow: auto;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.a-d-top {
|