|
@@ -43,9 +43,6 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="part-box-action">
|
|
|
- <el-button type="primary" plain icon="icon icon-set" @click="operConfig"
|
|
|
- >配置
|
|
|
- </el-button>
|
|
|
<el-button type="primary" icon="icon icon-plus-white" @click="addFile"
|
|
|
>新增</el-button
|
|
|
>
|
|
@@ -205,52 +202,6 @@
|
|
|
<el-button type="danger" plain @click="closeFileModel">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
- <el-dialog
|
|
|
- title="配置信息"
|
|
|
- width="550px"
|
|
|
- :visible.sync="configModel"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :modal="false"
|
|
|
- append-to-body
|
|
|
- custom-class="side-dialog"
|
|
|
- @close="closeConfigModel"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="configForm"
|
|
|
- :key="configModelKey"
|
|
|
- :inline="true"
|
|
|
- :model="configForm"
|
|
|
- :rules="configRules"
|
|
|
- label-width="90px"
|
|
|
- >
|
|
|
- <el-form-item v-if="isSuperAdmin" label="学校名称">
|
|
|
- <el-input
|
|
|
- v-model="configForm.orgName"
|
|
|
- disabled="true"
|
|
|
- class="pull-length"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="配置名称" prop="serviceName">
|
|
|
- <el-input
|
|
|
- v-model="configForm.serviceName"
|
|
|
- class="pull-length"
|
|
|
- placeholder="请输入serviceName"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :loading="configForm.loading"
|
|
|
- @click="subConfig"
|
|
|
- >确定</el-button
|
|
|
- >
|
|
|
- <el-button type="danger" plain @click="closeConfigModel"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -295,11 +246,6 @@ export default {
|
|
|
dataFile: null,
|
|
|
loading: false,
|
|
|
},
|
|
|
- configForm: {
|
|
|
- serviceName: null,
|
|
|
- orgName: null,
|
|
|
- loading: false,
|
|
|
- },
|
|
|
tableData: [],
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
@@ -340,21 +286,6 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- configRules: {
|
|
|
- serviceName: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- type: "string",
|
|
|
- message: "请输入配置名称",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- {
|
|
|
- pattern: /^[^\\/\\?%#&=\\+]*$/,
|
|
|
- message: "名称不能包含特殊字符 / ? % # & = +",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -451,33 +382,6 @@ export default {
|
|
|
}
|
|
|
this.fileModel = true;
|
|
|
},
|
|
|
- operConfig() {
|
|
|
- if (this.formSearch.rootOrgId == null) {
|
|
|
- this.$notify({
|
|
|
- type: "warning",
|
|
|
- message: "请选择学校",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- this.loading = true;
|
|
|
- var url =
|
|
|
- QUESTION_API + "/exportTemplate/config/" + this.formSearch.rootOrgId;
|
|
|
- this.$httpWithMsg
|
|
|
- .get(url)
|
|
|
- .then((response) => {
|
|
|
- this.configForm.serviceName = response.data.exportServiceName;
|
|
|
- if (this.isSuperAdmin) {
|
|
|
- for (const org of this.rootOrgList) {
|
|
|
- if (this.formSearch.rootOrgId == org.id) {
|
|
|
- this.configForm.orgName = org.name;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.configModel = true;
|
|
|
- })
|
|
|
- .finally(() => (this.loading = false));
|
|
|
- },
|
|
|
async subFile() {
|
|
|
const res = await this.$refs.fileForm.validate();
|
|
|
|
|
@@ -509,30 +413,6 @@ export default {
|
|
|
})
|
|
|
.finally(() => (this.fileForm.loading = false));
|
|
|
},
|
|
|
- async subConfig() {
|
|
|
- const res = await this.$refs.configForm.validate();
|
|
|
-
|
|
|
- if (res === false) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.configForm.loading = true;
|
|
|
- var params = "?serviceName=" + this.configForm.serviceName;
|
|
|
- var url =
|
|
|
- QUESTION_API +
|
|
|
- "/exportTemplate/config/" +
|
|
|
- this.formSearch.rootOrgId +
|
|
|
- params;
|
|
|
- this.$httpWithMsg
|
|
|
- .put(url)
|
|
|
- .then(() => {
|
|
|
- this.$notify({
|
|
|
- type: "success",
|
|
|
- message: "配置成功!",
|
|
|
- });
|
|
|
- this.closeConfigModel();
|
|
|
- })
|
|
|
- .finally(() => (this.configForm.loading = false));
|
|
|
- },
|
|
|
closeFileModel() {
|
|
|
this.fileModel = false;
|
|
|
this.$refs.fileForm.resetFields();
|