|
@@ -153,6 +153,7 @@
|
|
|
|
|
|
<div class="canEditFileName">{{lang.subjectTag}}</div>
|
|
<div class="canEditFileName">{{lang.subjectTag}}</div>
|
|
<selectTag
|
|
<selectTag
|
|
|
|
+ v-if="canEdit"
|
|
v-loading="tagLoading1"
|
|
v-loading="tagLoading1"
|
|
v-model="fileDetailCheck1"
|
|
v-model="fileDetailCheck1"
|
|
:options="tagData1"
|
|
:options="tagData1"
|
|
@@ -163,6 +164,7 @@
|
|
|
|
|
|
<div class="canEditFileName">{{lang.gradeTag}}</div>
|
|
<div class="canEditFileName">{{lang.gradeTag}}</div>
|
|
<selectTag
|
|
<selectTag
|
|
|
|
+ v-if="canEdit"
|
|
v-loading="tagLoading2"
|
|
v-loading="tagLoading2"
|
|
v-model="fileDetailCheck2"
|
|
v-model="fileDetailCheck2"
|
|
:options="tagData2"
|
|
:options="tagData2"
|
|
@@ -174,6 +176,7 @@
|
|
|
|
|
|
<div class="canEditFileName">{{lang.customTag}}:</div>
|
|
<div class="canEditFileName">{{lang.customTag}}:</div>
|
|
<selectTag2
|
|
<selectTag2
|
|
|
|
+ v-if="canEdit"
|
|
v-loading="tagLoading3"
|
|
v-loading="tagLoading3"
|
|
v-model="fileDetailCheck3"
|
|
v-model="fileDetailCheck3"
|
|
:options="tagData3"
|
|
:options="tagData3"
|
|
@@ -197,6 +200,19 @@
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="canEditFileName" style="margin-bottom: 9px;" v-if="fileDetail.juri == 2">{{ lang.labPermissions }}</div>
|
|
|
|
+
|
|
|
|
+ <div class="tag" v-if="fileDetail.juri == 2">
|
|
|
|
+ <div class="info_span" v-for="item in teaType" :key="item.id">
|
|
|
|
+ <span>
|
|
|
|
+ {{ item.name + ":" }}
|
|
|
|
+ </span>
|
|
|
|
+ <el-select v-model="item.value" multiple :placeholder="item.name" @change="Ochange">
|
|
|
|
+ <el-option v-for="i in item.child" :key="i.id" :label="i.name" :value="i.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<!-- disabled @change="updateFolder()" -->
|
|
<!-- disabled @change="updateFolder()" -->
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -255,15 +271,18 @@ export default {
|
|
check2: [],
|
|
check2: [],
|
|
check3: [],
|
|
check3: [],
|
|
fold:false,
|
|
fold:false,
|
|
|
|
+ oid: this.$route.query.oid,
|
|
|
|
+ teaType: [],
|
|
|
|
+ options: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
pid(newValue, oldValue) {
|
|
pid(newValue, oldValue) {
|
|
this.data = {};
|
|
this.data = {};
|
|
- this.getData();
|
|
|
|
this.getTag(1); // 获取标签
|
|
this.getTag(1); // 获取标签
|
|
this.getTag(2); // 获取标签
|
|
this.getTag(2); // 获取标签
|
|
this.getTag(3); // 获取标签
|
|
this.getTag(3); // 获取标签
|
|
|
|
+ this.getTypeInfo();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -336,19 +355,30 @@ export default {
|
|
this.getTag(1); // 获取标签
|
|
this.getTag(1); // 获取标签
|
|
this.getTag(2); // 获取标签
|
|
this.getTag(2); // 获取标签
|
|
this.getTag(3); // 获取标签
|
|
this.getTag(3); // 获取标签
|
|
- this.getData();
|
|
|
|
|
|
+ this.getTypeInfo();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
openCanEdit(){
|
|
openCanEdit(){
|
|
this.canEdit = true;
|
|
this.canEdit = true;
|
|
|
|
|
|
this.fileDetail = JSON.parse(JSON.stringify(this.data))
|
|
this.fileDetail = JSON.parse(JSON.stringify(this.data))
|
|
- this.fileDetailCheck1 = JSON.parse(JSON.stringify(this.check1))
|
|
|
|
- this.fileDetailCheck2 = JSON.parse(JSON.stringify(this.check2))
|
|
|
|
- this.fileDetailCheck3 = JSON.parse(JSON.stringify(this.check3))
|
|
|
|
|
|
+ this.fileDetailCheck1 = this.check1 ? JSON.parse(JSON.stringify(this.check1)) : []
|
|
|
|
+ this.fileDetailCheck2 = this.check2 ? JSON.parse(JSON.stringify(this.check2)) : []
|
|
|
|
+ this.fileDetailCheck3 = this.check3 ? JSON.parse(JSON.stringify(this.check3)) : []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ generateResultInfo() {
|
|
|
|
+ // 从 teaType 中提取所有的值
|
|
|
|
+ const selectedValues = this.teaType.flatMap(item => item.value);
|
|
|
|
+
|
|
|
|
+ console.log(selectedValues);
|
|
|
|
+
|
|
|
|
+ // 将合并后的数组转换为逗号分隔的字符串
|
|
|
|
+ return selectedValues.join(',');
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
modifyDetail(){
|
|
modifyDetail(){
|
|
if (!this.fileDetail.name.trim()) {
|
|
if (!this.fileDetail.name.trim()) {
|
|
@@ -365,13 +395,14 @@ export default {
|
|
ct: this.fileDetailCheck2.join(","),
|
|
ct: this.fileDetailCheck2.join(","),
|
|
t: this.fileDetailCheck3.join(","),
|
|
t: this.fileDetailCheck3.join(","),
|
|
j: this.fileDetail.juri,
|
|
j: this.fileDetail.juri,
|
|
|
|
+ j2: this.fileDetail.juri == 2 ? this.generateResultInfo() : "",
|
|
folderid: this.folderid
|
|
folderid: this.folderid
|
|
};
|
|
};
|
|
// t: this.fileDetailCheck3.join(","),
|
|
// t: this.fileDetailCheck3.join(","),
|
|
// return console.log('params2',params);
|
|
// return console.log('params2',params);
|
|
|
|
|
|
this.ajax
|
|
this.ajax
|
|
- .post(this.$store.state.fileApi + "updateFolder", [params])
|
|
|
|
|
|
+ .post(this.$store.state.fileApi + "updateFolder2", [params])
|
|
.then(res => {
|
|
.then(res => {
|
|
this.$message.success(this.lang.updateSuccess);
|
|
this.$message.success(this.lang.updateSuccess);
|
|
this.canEdit=false
|
|
this.canEdit=false
|
|
@@ -418,12 +449,47 @@ export default {
|
|
? res.data[0][0].class_tag.split(",")
|
|
? res.data[0][0].class_tag.split(",")
|
|
: [];
|
|
: [];
|
|
this.check3 = res.data[0][0].tag ? res.data[0][0].tag.split(",") : [];
|
|
this.check3 = res.data[0][0].tag ? res.data[0][0].tag.split(",") : [];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let teacherOffice = []
|
|
|
|
+ let array = []
|
|
|
|
+ for (var i = 0; i < this.options.length; i++) {
|
|
|
|
+ array.push(this.options[i].id)
|
|
|
|
+ }
|
|
|
|
+ teacherOffice = this.arrayToArray(this.data.teacherJuri.split(','), array)
|
|
|
|
+ console.log(this.data.teacherJuri);
|
|
|
|
+ let count = 0
|
|
|
|
+ this.teaType.forEach(e =>{
|
|
|
|
+ let array2 = []
|
|
|
|
+ for (var i = 0; i < e.child.length; i++) {
|
|
|
|
+ array2.push(e.child[i].id)
|
|
|
|
+ }
|
|
|
|
+ e.value = this.arrayToArray(this.data.teacherJuri.split(','), array2)
|
|
|
|
+ if(e.value.length){
|
|
|
|
+ count++
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
console.error(err);
|
|
console.error(err);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ arrayToArray(arrayo, arrayt) {
|
|
|
|
+ let array1 = arrayo;
|
|
|
|
+ let array2 = arrayt;
|
|
|
|
+
|
|
|
|
+ let commonElements = [];
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < array1.length; i++) {
|
|
|
|
+ for (let j = 0; j < array2.length; j++) {
|
|
|
|
+ if (array1[i] === array2[j]) {
|
|
|
|
+ commonElements.push(array1[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return commonElements;
|
|
|
|
+ },
|
|
getTag(type) {
|
|
getTag(type) {
|
|
const tagLoadings = [
|
|
const tagLoadings = [
|
|
this.tagLoading1,
|
|
this.tagLoading1,
|
|
@@ -625,6 +691,41 @@ export default {
|
|
});
|
|
});
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
|
|
+ },
|
|
|
|
+ //获取分类类名
|
|
|
|
+ getTypeInfo() {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ let params = {
|
|
|
|
+ oid: this.oid
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectPerInfoAllTea", params)
|
|
|
|
+ .then(res => {
|
|
|
|
+
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ this.teaType = res.data[0];
|
|
|
|
+ let typeInfo = res.data[1];
|
|
|
|
+
|
|
|
|
+ this.teaType.forEach(e => {
|
|
|
|
+ e.child = [];
|
|
|
|
+ e.value = [];
|
|
|
|
+ typeInfo.forEach(i => {
|
|
|
|
+ if (e.id == i.parentid) {
|
|
|
|
+ e.child.push({ id: i.id, name: i.name });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ console.log(this.teaType, "teaType");
|
|
|
|
+ this.options = res.data[2];
|
|
|
|
+ this.getData();
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ Ochange() {
|
|
|
|
+ this.$forceUpdate()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -917,4 +1018,21 @@ export default {
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.info_span {
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ width: 350px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.info_span>span:nth-child(1) {
|
|
|
|
+ /* width: 100px;
|
|
|
|
+ min-width: 100px; */
|
|
|
|
+ /* text-align: right; */
|
|
|
|
+ line-height: 40px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.info_span>div {
|
|
|
|
+ width: 250px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|