|
@@ -13,9 +13,7 @@
|
|
label-position="right"
|
|
label-position="right"
|
|
>
|
|
>
|
|
<div style="margin-bottom: 10px;">
|
|
<div style="margin-bottom: 10px;">
|
|
- <el-button type="primary" size="small" @click="savePrevillegeExam"
|
|
|
|
- >保 存</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" size="small">保 存</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
@@ -37,7 +35,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
- @click="deleteBatchExam"
|
|
|
|
|
|
+ @click="deleteBatch('Exam')"
|
|
:disabled="noBatchSelectedExam"
|
|
:disabled="noBatchSelectedExam"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
@@ -45,7 +43,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
- @click="deleteBatchExam"
|
|
|
|
|
|
+ @click="addExam"
|
|
>添加</el-button
|
|
>添加</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -104,7 +102,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
- @click="deleteBatchCourse"
|
|
|
|
|
|
+ @click="deleteBatch('Course')"
|
|
:disabled="noBatchSelectedCourse"
|
|
:disabled="noBatchSelectedCourse"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
@@ -112,7 +110,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
- @click="deleteBatchCourse"
|
|
|
|
|
|
+ @click="addCourse"
|
|
>添加</el-button
|
|
>添加</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -176,7 +174,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
- @click="deleteBatchOrg"
|
|
|
|
|
|
+ @click="deleteBatch('Org')"
|
|
:disabled="noBatchSelectedOrg"
|
|
:disabled="noBatchSelectedOrg"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
@@ -184,7 +182,7 @@
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
- @click="deleteBatchOrg"
|
|
|
|
|
|
+ @click="addOrg"
|
|
>添加</el-button
|
|
>添加</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -235,6 +233,21 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
|
|
+ <DataPrevillegeAddExamDialog
|
|
|
|
+ ref="addExamDialog"
|
|
|
|
+ :userId="userId"
|
|
|
|
+ @reload="init"
|
|
|
|
+ />
|
|
|
|
+ <DataPrevillegeAddCourseDialog
|
|
|
|
+ ref="addCourseDialog"
|
|
|
|
+ :userId="userId"
|
|
|
|
+ @reload="init"
|
|
|
|
+ />
|
|
|
|
+ <DataPrevillegeAddOrgDialog
|
|
|
|
+ ref="addOrgDialog"
|
|
|
|
+ :userId="userId"
|
|
|
|
+ @reload="init"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -243,11 +256,17 @@ import { mapState } from "vuex";
|
|
import { CORE_API } from "@/constants/constants.js";
|
|
import { CORE_API } from "@/constants/constants.js";
|
|
import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
|
|
import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
|
|
import { object2QueryString } from "@/utils/utils";
|
|
import { object2QueryString } from "@/utils/utils";
|
|
|
|
+import DataPrevillegeAddExamDialog from "./data_previllege_add_exam";
|
|
|
|
+import DataPrevillegeAddCourseDialog from "./data_previllege_add_course";
|
|
|
|
+import DataPrevillegeAddOrgDialog from "./data_previllege_add_org";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "DataPrevillege",
|
|
name: "DataPrevillege",
|
|
components: {
|
|
components: {
|
|
- LinkTitlesCustom
|
|
|
|
|
|
+ LinkTitlesCustom,
|
|
|
|
+ DataPrevillegeAddExamDialog,
|
|
|
|
+ DataPrevillegeAddCourseDialog,
|
|
|
|
+ DataPrevillegeAddOrgDialog
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -386,12 +405,34 @@ export default {
|
|
this.form["defaultStatus" + type] = !enabled;
|
|
this.form["defaultStatus" + type] = !enabled;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- savePrevillegeExam() {},
|
|
|
|
- deleteBatchExam() {},
|
|
|
|
- savePrevillegeCourse() {},
|
|
|
|
- deleteBatchCourse() {},
|
|
|
|
- savePrevillegeOrg() {},
|
|
|
|
- deleteBatchOrg() {}
|
|
|
|
|
|
+ addExam() {
|
|
|
|
+ this.$refs.addExamDialog.openDialog();
|
|
|
|
+ },
|
|
|
|
+ async deleteBatch(type) {
|
|
|
|
+ const ids = this.$refs["table" + type].selection.map(v => v.id).join();
|
|
|
|
+ try {
|
|
|
|
+ await this.$httpWithMsg.post(
|
|
|
|
+ CORE_API +
|
|
|
|
+ "/user/data/rule/delete?" +
|
|
|
|
+ object2QueryString({
|
|
|
|
+ ids
|
|
|
|
+ })
|
|
|
|
+ );
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功"
|
|
|
|
+ });
|
|
|
|
+ await this.init();
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ addCourse() {
|
|
|
|
+ this.$refs.addCourseDialog.openDialog();
|
|
|
|
+ },
|
|
|
|
+ addOrg() {
|
|
|
|
+ this.$refs.addOrgDialog.openDialog();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
this.userId = this.$route.params.userId;
|
|
this.userId = this.$route.params.userId;
|