diff --git a/src/api/management/exam.js b/src/api/management/exam.js index a0a6b7e99..97cee7e97 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -214,3 +214,33 @@ export function getQuestionAmount(data) { data, }) } + +/** 试卷蓝图封存 + * @param {Number} pcId 试卷蓝图Id + */ +export function lockPaper(pcId) { + return request({ + url: `/api/v2/paper/composition/${pcId}/lock`, + method: 'PUT', + }) +} + +/** 试卷蓝图解封 + * @param {Number} pcId 试卷蓝图Id + */ +export function unlockPaper(pcId) { + return request({ + url: `/api/v2/paper/composition/${pcId}/unlock`, + method: 'PUT', + }) +} + +/** 试卷蓝图删除 + * @param {Number} pcId 试卷蓝图Id + */ +export function deletePaper(pcId) { + return request({ + url: `/api/v2/paper/composition/${pcId}`, + method: 'DELETE', + }) +} diff --git a/src/api/questionBank.js b/src/api/questionBank.js index 59f75097b..97147e046 100644 --- a/src/api/questionBank.js +++ b/src/api/questionBank.js @@ -11,7 +11,7 @@ export function listQuestionPage(params) { } // 标签列表 -export function getLableList() { +export function getLabelList() { return request({ url: `/api/question/org/label`, method: 'get' diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue index 389f87a87..e44b7d67c 100644 --- a/src/views/competitionManage/bankList/index.vue +++ b/src/views/competitionManage/bankList/index.vue @@ -8,7 +8,7 @@ + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/dialog/protectReset.vue b/src/views/iscs/iscsSystemNew/stationConfig/dialog/protectReset.vue new file mode 100644 index 000000000..c981095b3 --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/dialog/protectReset.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/dialog/valve.vue b/src/views/iscs/iscsSystemNew/stationConfig/dialog/valve.vue new file mode 100644 index 000000000..7a2f985fa --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/dialog/valve.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/environment.vue b/src/views/iscs/iscsSystemNew/stationConfig/environment.vue new file mode 100644 index 000000000..67c0cf78b --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/environment.vue @@ -0,0 +1,202 @@ + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/fas.vue b/src/views/iscs/iscsSystemNew/stationConfig/fas.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/views/iscs/iscsSystemNew/stationConfig/index.vue b/src/views/iscs/iscsSystemNew/stationConfig/index.vue new file mode 100644 index 000000000..735281a79 --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/index.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue new file mode 100644 index 000000000..b026f9661 --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue @@ -0,0 +1,327 @@ + + + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue b/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue new file mode 100644 index 000000000..b1b8e6315 --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/psdSystem.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/iscs/iscsSystemNew/stationConfig/signalSystem.vue b/src/views/iscs/iscsSystemNew/stationConfig/signalSystem.vue new file mode 100644 index 000000000..e69de29bb diff --git a/src/views/iscs/iscsSystemNew/stationConfig/substation.vue b/src/views/iscs/iscsSystemNew/stationConfig/substation.vue new file mode 100644 index 000000000..abadcb2e9 --- /dev/null +++ b/src/views/iscs/iscsSystemNew/stationConfig/substation.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/iscs/iscsSystemNew/stationNav.vue b/src/views/iscs/iscsSystemNew/stationNav.vue index 80d68116b..57c702b3e 100644 --- a/src/views/iscs/iscsSystemNew/stationNav.vue +++ b/src/views/iscs/iscsSystemNew/stationNav.vue @@ -13,6 +13,32 @@
{{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
控制中心
+
停车场
+
车辆段
+
+
+
+
+
+
+
+
+
主所1
+
主所2
+
+
@@ -22,6 +48,7 @@ import { getByGroupStationList } from '@/api/jmap/map'; import iscs_icon1 from '@/assets/iscs_system/iscs_icon1.png'; import iscs_icon2 from '@/assets/iscs_system/iscs_icon2.png'; import iscs_icon3 from '@/assets/iscs_system/iscs_icon3.png'; +import iscs_icon4 from '@/assets/iscs_system/iscs_icon4.png'; import iscs_icon5 from '@/assets/iscs_system/iscs_icon5.png'; import iscs_icon6 from '@/assets/iscs_system/iscs_icon6.png'; import iscs_icon7 from '@/assets/iscs_system/iscs_icon7.png'; @@ -31,7 +58,9 @@ export default { return { selectStation: 'mainHouseOne', stationList:[], + tractionList:[], buttonId:'substation', + // buttonId:'psdSystem', buttonList:{ stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 }, electric: {name:'电力监控系统', type:'totalSystem', id: 'powerMonitoring', active:false, icon:iscs_icon2, @@ -261,7 +290,6 @@ export default { // } ]} } - // mode: 'substation' }; }, async created () { @@ -275,18 +303,14 @@ export default { name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}站`, id: station.code }; - if (station.centralized) { this.tractionList.push(param.name); } - this.stationList.push(param); } }); } - // if (!this.$route.params.mode) { - // this.selectChildren(this.buttonId, true); - // } + this.selectChildren(this.buttonId); }, methods:{ changeStation(item) { @@ -294,8 +318,223 @@ export default { this.selectChildren(this.buttonId); }, selectChildren(type) { // 选择菜单 + let stationName = ''; + const station = this.stationList.find(each=>{ return each.id == this.selectStation; }); + if (station) { + stationName = station.name; + } + const param = { + stationName: stationName, + stationId: this.selectStation, + type:type + }; + this.$emit('selectIscsPane', param); + // const query = { + // stationName: stationName, + // stationId: this.selectStation, + // group: this.group, + // mapId: this.$route.query.mapId, + // lineCode:'02', + // noPreLogout:this.$route.query.noPreLogout + // }; + // if (isReplace) { + // this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); + // } else { + // this.$router.push({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); + // } } } }; + diff --git a/src/views/organization/examManage/index.vue b/src/views/organization/examManage/index.vue index 3379fd228..6ae1642f3 100644 --- a/src/views/organization/examManage/index.vue +++ b/src/views/organization/examManage/index.vue @@ -16,7 +16,7 @@ const paperStateMap = { '2': '封存', '3': '已使用', } -import { getExamListProject, getPapaerListOfOrg, setExamEffectivey, setExamEfficacy } from '@/api/management/exam' +import { getPapaerListOfOrg, lockPaper, unlockPaper, deletePaper } from '@/api/management/exam' import { getPublishMapListOnline } from '@/api/jmap/map' export default { @@ -39,10 +39,6 @@ export default { type: 'text', label: '试卷名称:', }, - // creatorName: { - // type: 'text', - // label: '创建人:' - // }, state: { type: 'select', label: '状态:', @@ -53,7 +49,6 @@ export default { }, }, examQueryList: { - // query: getExamListProject, query: obj => getPapaerListOfOrg({ ...obj, orgId: this.orgId }), selectCheckShow: false, indexShow: false, @@ -63,32 +58,8 @@ export default { prop: 'name', }, { - title: '归属地图', - prop: 'mapId', - type: 'tag', - width: '200', - columnValue: row => { - return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']) - }, - tagType: row => { - return '' - }, - }, - { - title: '产品类型', - prop: 'prdType', - type: 'tag', - width: '110', - columnValue: row => { - if (row.prdType === '01') { - return '现地工作站' - } else if (row.prdType === '02') { - return '行调工作站' - } - }, - tagType: row => { - return '' - }, + title: '简介', + prop: 'profile', }, { title: '状态', @@ -98,21 +69,7 @@ export default { columnValue: row => { return paperStateMap[row.state] }, - tagType: row => { - return '' - }, - }, - { - title: '试卷规则状态', - prop: 'abnormal', - type: 'tag', - width: '80', - columnValue: row => { - return row.abnormal ? '异常' : '正常' - }, - tagType: row => { - return row.abnormal ? 'danger' : 'success' - }, + tagType: row => '', }, { title: '开始时间', @@ -144,6 +101,7 @@ export default { title: '创建人', prop: 'creatorName', width: '150', + formatter: row => row.creatorInfo.name, }, { type: 'button', @@ -162,26 +120,34 @@ export default { }, { name: '编辑', - handleClick: this.handleEditExam, + handleClick: this.handleEdit, type: 'primary', showControl: row => { - return row.creatorId == this.userId + return row.creatorId == this.userId && row.state === 1 }, }, { - name: '启用', - handleClick: this.handleEnableExam, + name: '封存', + handleClick: this.handleLock, type: 'warning', showControl: row => { - return row.creatorId == this.userId /* && row.status == '0' */ + return row.creatorId == this.userId && row.state === 1 }, }, { - name: '禁用', - handleClick: this.handleDeleteExam, + name: '解封', + handleClick: this.handleUnlock, type: 'danger', showControl: row => { - return row.creatorId == this.userId /* && row.status == '1' */ + return row.creatorId == this.userId && row.state === 2 + }, + }, + { + name: '删除', + handleClick: this.handleDelete, + type: 'danger', + showControl: row => { + return row.creatorId == this.userId && row.state === 1 }, }, ], @@ -200,11 +166,6 @@ export default { }, }, created() { - // const params = localStore.get(this.$route.path) || {} - // if (!params.status) { - // params.status = '1' - // } - // localStore.set(this.$route.path, params) this.mapIdList = [] getPublishMapListOnline().then(response => { this.mapIdList = response.data @@ -217,49 +178,67 @@ export default { handleGradeStatistics(index, row) { this.$router.push({ path: '/info/gradeStatistics', query: { examId: row.id, name: row.name } }) }, - handleEditExam(index, row) { + handleEdit(index, row) { this.$router.push({ path: `/info/examRule/draft/edit/${row.id}`, query: { source: 'org' } }) }, examCreate() { this.$router.push({ path: `/info/examRule/draft/add/0`, query: { source: 'org' } }) }, - handleEnableExam(index, data) { - setExamEffectivey(data) + handleLock(index, data) { + lockPaper(data.id) .then(res => { this.examRefresh() - this.$message.success('启用试卷成功!') + this.$message.success('封存试卷成功!') }) .catch(error => { - this.$message.error('启用试卷失败:' + error.message) + this.$message.error('封存试卷失败:' + error.message) }) }, - handleDeleteExam(index, data) { - this.$confirm('该操作将禁用试卷,是否继续?', this.$t('global.tips'), { + handleUnlock(index, data) { + this.$confirm('该操作将解封试卷,是否继续?', this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'), cancelButtonText: this.$t('global.cancel'), type: 'warning', }) .then(() => { - setExamEfficacy(data) + unlockPaper(data.id) .then(res => { this.examRefresh() this.$message({ type: 'success', - message: '禁用试卷成功!', + message: '解封试卷成功!', }) }) .catch(res => { if (res.code == '10004') { - this.$message({ type: 'error', message: '禁用失败:试卷已被使用,无法禁用!' }) + this.$message({ type: 'error', message: '解封失败:试卷已被使用,无法解封!' }) } else if (res.code == '10003') { - this.$message({ type: 'warning', message: '禁用失败:无权限禁用!' }) + this.$message({ type: 'warning', message: '解封失败:无权限解封!' }) } else { - this.$message({ type: 'error', message: '禁用试卷失败!' }) + this.$message({ type: 'error', message: '解封试卷失败!' }) } }) }) .catch(() => {}) }, + handleDelete(index, data) { + this.$confirm('确定删除该试卷吗?', this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), + type: 'warning', + }) + .then(() => deletePaper(data.id)) + .then(resp => { + this.examRefresh() + this.$message({ + type: 'success', + message: '删除成功!', + }) + }) + .catch(res => { + this.$message({ type: 'error', message: '删除试卷失败!' }) + }) + }, examRefresh() { this.$nextTick(() => { this.$refs.examQueryListPage.refresh(true) diff --git a/src/views/publish/examRule/draft/editRule.vue b/src/views/publish/examRule/draft/editRule.vue index 1afb0aca4..b1b915159 100644 --- a/src/views/publish/examRule/draft/editRule.vue +++ b/src/views/publish/examRule/draft/editRule.vue @@ -38,7 +38,9 @@ - + + + import { getQuestionAmount } from '@/api/management/exam' +import { getLabelList } from '@/api/questionBank' export default { name: 'EditRule', props: {}, @@ -116,6 +119,7 @@ export default { amount: 1, score: 1, }, + labels: [], topicNum: 0, dialogShow: false, rules: { @@ -127,8 +131,10 @@ export default { } }, created() { - - }, + getLabelList().then(resp => { + this.labels = resp.data.map(v => ({ label: v, value: v })) + }) + }, mounted() {}, methods: { show(detail) { @@ -157,6 +163,7 @@ export default { orgId: this.$store.state.user.companyId, groupType: this.form.type, subType: this.form.subtype, + tags: this.form.tags, } getQuestionAmount(param).then(resp => { this.topicNum = resp.data diff --git a/src/views/publish/examRule/draft/rule.vue b/src/views/publish/examRule/draft/rule.vue index 823874745..42420626c 100644 --- a/src/views/publish/examRule/draft/rule.vue +++ b/src/views/publish/examRule/draft/rule.vue @@ -25,7 +25,7 @@ - + @@ -35,6 +35,11 @@ {{ scope.row.topicNum }} + + +