|
@@ -16,7 +16,7 @@
|
|
|
<el-row class="row">
|
|
|
网管课可选声部
|
|
|
<select-all
|
|
|
- class="chioseOragn"
|
|
|
+ class="chioseOragn"
|
|
|
multiple
|
|
|
collapse-tags
|
|
|
v-model="organIdList"
|
|
@@ -33,25 +33,64 @@
|
|
|
></el-option>
|
|
|
</select-all>
|
|
|
老师
|
|
|
- <el-button type="primary" size="mini" class="submitBtn">保存</el-button>
|
|
|
+ <el-button type="primary" size="mini" class="submitBtn" @click="submit"
|
|
|
+ >保存</el-button
|
|
|
+ >
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { sysConfigList, sysConfigUpdate } from "@/api/generalSettings";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
organIdList: [],
|
|
|
+ activeItem: null,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$store.dispatch("setBranchs");
|
|
|
+ sysConfigList({ group: "PRACTICE" }).then((res) => {
|
|
|
+ if (res.code == 200 && res.data.length > 0) {
|
|
|
+ res.data.forEach((item, index) => {
|
|
|
+ if (item.paramName == "practice_teacher_organ_range") {
|
|
|
+ this.activeItem = item;
|
|
|
+ this.organIdList = item.paranValue?item.paranValue.split(",").map((oragn) => {
|
|
|
+ return Number(oragn);
|
|
|
+ }):[]
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ submit() {
|
|
|
+ if (this.organIdList.length < 0) {
|
|
|
+ this.$message.error("请至少选择一个分部");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let params = { ...this.activeItem };
|
|
|
+ params.paranValue = this.organIdList.join(",");
|
|
|
+ sysConfigUpdate(params).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ /**
|
|
|
+ * let params = {
|
|
|
+ id: row.id,
|
|
|
+ paranValue: this.input[index],
|
|
|
+ paramName: row.paramName,
|
|
|
+ description: row.description.join('{}')
|
|
|
+ }
|
|
|
+ */
|
|
|
+ // submit
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
.chioseOragn {
|
|
|
width: 400px;
|
|
|
margin: 0 5px;
|