装备数据库装备分类管理,装备管理,用户导入
This commit is contained in:
parent
89fa84c918
commit
8d7f731ce2
|
@ -102,7 +102,28 @@ Vue.use(Descriptions)
|
|||
Vue.use(Space)
|
||||
Vue.use(Pagination)
|
||||
|
||||
Vue.prototype.$confirm = Modal.confirm
|
||||
Vue.prototype.$confirm = (opts) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Modal.confirm({
|
||||
...(typeof opts === 'string' ? { content: opts } : opts),
|
||||
onOk: async () => {
|
||||
if (opts.onOk) {
|
||||
try {
|
||||
const res = await opts.onOk()
|
||||
resolve(res)
|
||||
} catch (error) {
|
||||
reject(error)
|
||||
}
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
reject(false)
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
Vue.prototype.$message = message
|
||||
Vue.prototype.$notification = notification
|
||||
Vue.prototype.$info = Modal.info
|
||||
|
|
|
@ -56,7 +56,11 @@ request.interceptors.request.use((config) => {
|
|||
|
||||
// response interceptor
|
||||
request.interceptors.response.use((response) => {
|
||||
if (response.data && response.data.code && response.data.code > 5000 && response.data.code < 5008) {
|
||||
if (
|
||||
response.data &&
|
||||
response.data.code &&
|
||||
((response.data.code > 5000 && response.data.code < 5008) || response.data.code === 500)
|
||||
) {
|
||||
Vue.prototype.$message.error(response.data.message || '未知错误,请重试')
|
||||
return Promise.reject(response.data)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,16 @@
|
|||
<a-button style="margin-left: 8px" @click="resetQuery">重置</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<div style="clear: both"></div>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button icon="plus" type="primary" style="margin-right: 10px;" @click="handleAdd">新增</a-button>
|
||||
<a-button icon="plus" type="primary" style="margin-right: 10px" @click="handleAdd">新增</a-button>
|
||||
<a-upload action="" :customRequest="handleImport" accept=".xlsx,.xls" :showUploadList="false">
|
||||
<a-button icon="import" type="primary" style="margin-right: 10px">导入</a-button>
|
||||
</a-upload>
|
||||
</div>
|
||||
<a-table :columns="tableColumn" :dataSource="tableData" :pagination="pagination" :scroll="{x:true}" bordered>
|
||||
<a-table :columns="tableColumn" :dataSource="tableData" :pagination="pagination" :scroll="{ x: true }" bordered>
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
|
@ -33,126 +36,122 @@
|
|||
<span v-if="text == 1">训练员</span>
|
||||
</template>
|
||||
<template slot="optionColumn" slot-scope="text, record">
|
||||
<a-button size="small" type="primary" @click="handleEdit(record)" style="margin-left: 15px;">编辑</a-button>
|
||||
<a-button size="small" type="danger" @click="handleDelete(record)" style="margin-left: 15px;">删除</a-button>
|
||||
<a-button size="small" type="primary" @click="handleResetpwdCpp(record)" style="margin-left: 15px;">重置密码</a-button>
|
||||
<a-button size="small" type="primary" @click="handleEdit(record)" style="margin-left: 15px">编辑</a-button>
|
||||
<a-button size="small" type="danger" @click="handleDelete(record)" style="margin-left: 15px">删除</a-button>
|
||||
<a-button size="small" type="primary" @click="handleResetpwdCpp(record)" style="margin-left: 15px">
|
||||
重置密码
|
||||
</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<AEuser :visible="aeuser.visible" :formTitile="aeuser.title" :formData="aeuser.formData" @close="closeAEuser" />
|
||||
</page-header-wrapper>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
deleteAction,
|
||||
getAction,
|
||||
postAction,
|
||||
putAction1
|
||||
} from '@/api/manage'
|
||||
import { deleteAction, getAction, postAction, putAction1 } from '@/api/manage'
|
||||
import AEuser from './modules/AEuser.vue'
|
||||
export default {
|
||||
name: 'User',
|
||||
components: {
|
||||
AEuser
|
||||
AEuser,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
// 分页参数
|
||||
pagination: {
|
||||
pageNum: 1,
|
||||
pageSize: 10, // 默认每页显示数量
|
||||
showSizeChanger: true, // 显示可改变每页数量
|
||||
pageSizeOptions: ['10', '20', '50', '100'], // 每页数量选项
|
||||
showTotal: (total) => `共${total}条`, // 显示总数
|
||||
onChange: this.onPageChange.bind(this), //点击页码事件
|
||||
onShowSizeChange: this.onPageSizeChange.bind(this), // pageSize 变化的回调
|
||||
total: 0, //总条数
|
||||
current: 0,
|
||||
buildOptionText: (pageSizeOptions) => `${pageSizeOptions.value}条 / 页`
|
||||
pageNum: 1,
|
||||
pageSize: 10, // 默认每页显示数量
|
||||
showSizeChanger: true, // 显示可改变每页数量
|
||||
pageSizeOptions: ['10', '20', '50', '100'], // 每页数量选项
|
||||
showTotal: (total) => `共${total}条`, // 显示总数
|
||||
onChange: this.onPageChange.bind(this), //点击页码事件
|
||||
onShowSizeChange: this.onPageSizeChange.bind(this), // pageSize 变化的回调
|
||||
total: 0, //总条数
|
||||
current: 0,
|
||||
buildOptionText: (pageSizeOptions) => `${pageSizeOptions.value}条 / 页`,
|
||||
},
|
||||
tableColumn: [
|
||||
{
|
||||
title: '序号',
|
||||
scopedSlots: {
|
||||
customRender: 'serial'
|
||||
customRender: 'serial',
|
||||
},
|
||||
width: 60
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
title: '账号',
|
||||
key: 'userName',
|
||||
dataIndex: 'userName',
|
||||
scopedSlots: {
|
||||
customRender: 'userName'
|
||||
}
|
||||
customRender: 'userName',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
key: 'realName',
|
||||
dataIndex: 'realName',
|
||||
scopedSlots: {
|
||||
customRender: 'realName'
|
||||
}
|
||||
customRender: 'realName',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '是否为管理员',
|
||||
key: 'isAdmin',
|
||||
dataIndex: 'isAdmin',
|
||||
scopedSlots: {
|
||||
customRender: 'isAdmin'
|
||||
}
|
||||
customRender: 'isAdmin',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '第三方用户角色',
|
||||
key: 'thirdRole',
|
||||
dataIndex: 'thirdRole',
|
||||
scopedSlots: {
|
||||
customRender: 'thirdRole'
|
||||
}
|
||||
customRender: 'thirdRole',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '工作单位',
|
||||
key: 'company',
|
||||
dataIndex: 'company',
|
||||
scopedSlots: {
|
||||
customRender: 'company'
|
||||
}
|
||||
customRender: 'company',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '职务职称',
|
||||
key: 'positional',
|
||||
dataIndex: 'positional',
|
||||
scopedSlots: {
|
||||
customRender: 'positional'
|
||||
}
|
||||
customRender: 'positional',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '专业方向',
|
||||
key: 'specialDirect',
|
||||
dataIndex: 'specialDirect',
|
||||
scopedSlots: {
|
||||
customRender: 'specialDirect'
|
||||
}
|
||||
customRender: 'specialDirect',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
key: 'createUserId',
|
||||
dataIndex: 'createUserId',
|
||||
scopedSlots: {
|
||||
customRender: 'createUserId'
|
||||
}
|
||||
customRender: 'createUserId',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'optionColumn',
|
||||
dataIndex: 'optionColumn',
|
||||
scopedSlots: {
|
||||
customRender: 'optionColumn'
|
||||
}
|
||||
customRender: 'optionColumn',
|
||||
},
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
|
@ -170,54 +169,50 @@ export default {
|
|||
positional: undefined,
|
||||
specialDirect: undefined,
|
||||
// roles: [],
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created () {
|
||||
|
||||
},
|
||||
mounted () {
|
||||
computed: {},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
const param = {
|
||||
pageNum: this.pagination.current ?
|
||||
this.pagination.pageSize >= this.pagination.total ?
|
||||
1 :
|
||||
this.pagination.current :
|
||||
1,
|
||||
pageSize: this.pagination.pageSize,
|
||||
...this.queryParam
|
||||
pageNum: this.pagination.current
|
||||
? this.pagination.pageSize >= this.pagination.total
|
||||
? 1
|
||||
: this.pagination.current
|
||||
: 1,
|
||||
pageSize: this.pagination.pageSize,
|
||||
...this.queryParam,
|
||||
}
|
||||
getAction('/cssystem/user/getList',{
|
||||
...param
|
||||
getAction('/cssystem/user/getList', {
|
||||
...param,
|
||||
}).then((res) => {
|
||||
this.tableData = res.data
|
||||
// this.pagination.total = res.data.totalCount
|
||||
// console.log(this.tableData, 'this.tableData')
|
||||
this.tableData = res.data
|
||||
// this.pagination.total = res.data.totalCount
|
||||
// console.log(this.tableData, 'this.tableData')
|
||||
})
|
||||
},
|
||||
// 分页No
|
||||
onPageChange(page, pageSize) {
|
||||
this.pagination.current = page
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
this.pagination.current = page
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
},
|
||||
// 分页Size
|
||||
onPageSizeChange(current, pageSize) {
|
||||
this.pagination.pageSize = pageSize
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
this.pagination.pageSize = pageSize
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
},
|
||||
queryData() {
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParam = {}
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
this.queryParam = {}
|
||||
this.getList(this.request_Url, this.parentId)
|
||||
},
|
||||
handleAdd() {
|
||||
this.aeuser.title = '新增'
|
||||
|
@ -233,34 +228,34 @@ export default {
|
|||
title: '温馨提示',
|
||||
content: '确定要删除该用户吗?',
|
||||
onOk: () => {
|
||||
deleteAction('/cssystem/user/delete?id='+record.id).then((res) => {
|
||||
if(res.code == 200 && res.data) {
|
||||
deleteAction('/cssystem/user/delete?id=' + record.id).then((res) => {
|
||||
if (res.code == 200 && res.data) {
|
||||
this.vueMessage('success', res.message)
|
||||
this.getList()
|
||||
} else {
|
||||
this.vueMessage('error', res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
handleResetpwdCpp (record) {
|
||||
handleResetpwdCpp(record) {
|
||||
this.$confirm({
|
||||
title: '温馨提示',
|
||||
content: '确定要重置密码吗?',
|
||||
onOk: () => {
|
||||
putAction1('/cssystem/user/reset?id='+record.id).then((res) => {
|
||||
if(res.code == 200 && res.data) {
|
||||
putAction1('/cssystem/user/reset?id=' + record.id).then((res) => {
|
||||
if (res.code == 200 && res.data) {
|
||||
this.vueMessage('success', res.message)
|
||||
this.getList()
|
||||
} else {
|
||||
this.vueMessage('error', res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
vueMessage(type,msgText) {
|
||||
vueMessage(type, msgText) {
|
||||
this.$message[type](msgText)
|
||||
},
|
||||
closeAEuser() {
|
||||
|
@ -277,11 +272,28 @@ export default {
|
|||
avatar: null,
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
async handleImport(file) {
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
await this.$http({
|
||||
url: '/upload',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
})
|
||||
this.$message.success('导入成功')
|
||||
this.getList()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
|
|
@ -358,20 +358,8 @@ export default {
|
|||
this.getRoomList()
|
||||
this.scenarioModal.visible = false
|
||||
this.clearScenarioModal()
|
||||
const shifou = await new Promise((resolve) => {
|
||||
this.$confirm({
|
||||
content: `创建新房间成功,房间编号${res.data.roomCode},是否立即进入?`,
|
||||
onOk() {
|
||||
resolve(true)
|
||||
},
|
||||
onCancel() {
|
||||
resolve(false)
|
||||
},
|
||||
})
|
||||
})
|
||||
if (shifou) {
|
||||
this.handleJoinRoom(res.data)
|
||||
}
|
||||
await this.$confirm(`创建新房间成功,房间编号${res.data.roomCode},是否立即进入?`)
|
||||
this.handleJoinRoom(res.data)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
|
1860
src/views/simulationScene/database/modules/componentDlg.vue
Normal file
1860
src/views/simulationScene/database/modules/componentDlg.vue
Normal file
File diff suppressed because it is too large
Load Diff
2778
src/views/simulationScene/database/modules/componentEditlistData.js
Normal file
2778
src/views/simulationScene/database/modules/componentEditlistData.js
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,154 @@
|
|||
<template>
|
||||
<a-modal
|
||||
:visible="visible"
|
||||
:mask-closable="false"
|
||||
title="详情"
|
||||
:width="848"
|
||||
:footer="null"
|
||||
destroyOnClose
|
||||
@cancel="close">
|
||||
<a-table :columns="populationColumn" :dataSource="populationList" :pagination="false" :scroll="{x:true}" bordered>
|
||||
<template slot="serial" slot-scope="text, record, index0">
|
||||
{{ index0 + 1 }}
|
||||
</template>
|
||||
<template slot="valuetype" slot-scope="text, record">
|
||||
<!-- 公共ID展示 -->
|
||||
<template v-if="record.translate == '#DBID'">
|
||||
{{ record.value }}
|
||||
</template>
|
||||
<!-- 判断展示类型为:详情 -->
|
||||
<template v-if="text == 'combobox'">
|
||||
<template v-if="record.fieldname == 'Type'">
|
||||
{{ record.value }}
|
||||
</template>
|
||||
<template v-if="record.fieldname == 'Category'">
|
||||
{{ record.value }}
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="text == 'combostr'">
|
||||
<span v-for="(item1,index1) in record.value.split(',')" :key="index1">
|
||||
<span v-for="(item2,index2) in dicData.operatorcountry" :key="index2">
|
||||
<span v-if="item2.id == item1">
|
||||
<span style="margin-right:5px;">{{ item2.description }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="text == 'combotree'">
|
||||
<span v-for="(item1,index1) in treeData" :key="index1">
|
||||
<span v-if="item1.key == record.value">
|
||||
{{ item1.title }}
|
||||
</span>
|
||||
<span v-for="(item2,index2) in item1.children" :key="index2">
|
||||
<span v-if="item2.key == record.value">
|
||||
{{ item2.title }}
|
||||
</span>
|
||||
<span v-for="(item3,index3) in item2.children" :key="index3">
|
||||
<span v-if="item3.key == record.value">
|
||||
{{ item3.title }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="text == 'checkbox'">
|
||||
<span v-if="record.value == 1">是</span>
|
||||
<span v-if="record.value == 0">否</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="record.translate != '#DBID'">
|
||||
{{ record.value }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '@/api/manage'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
populationList: [],
|
||||
populationColumn: [
|
||||
{
|
||||
title: '',
|
||||
scopedSlots: {
|
||||
customRender: 'serial'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '参数',
|
||||
key: 'translate',
|
||||
dataIndex: 'translate',
|
||||
scopedSlots: {
|
||||
customRender: 'translate'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'valuetype',
|
||||
dataIndex: 'valuetype',
|
||||
scopedSlots: {
|
||||
customRender: 'valuetype'
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
entityType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
guid: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},//主键id
|
||||
},
|
||||
watch: {
|
||||
visible (val) {
|
||||
if (val) {
|
||||
this.getData()
|
||||
console.log(this.id, 'id888')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData () {
|
||||
const entityType1 = this.entityType.toLowerCase()
|
||||
getAction('/dbdata/aircraft/getInfoList',{
|
||||
tableName: 'Data' + this.entityType
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
getAction('/basedata/' + entityType1 + '/getInfo?id=' + this.id, {}).then((res2) => {
|
||||
for(const i in res.data) {
|
||||
for(const j in res2.data) {
|
||||
if(j == res.data[i].fieldname) {
|
||||
console.log(res.data[i],'res.data[i]')
|
||||
res.data[i].value = res2.data[j]
|
||||
}
|
||||
}
|
||||
}
|
||||
this.populationList = res.data
|
||||
console.log(this.populationList,'this.populationList')
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.populationList = []
|
||||
this.$emit('closeModal')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
1015
src/views/simulationScene/database/modules/infoData.vue
Normal file
1015
src/views/simulationScene/database/modules/infoData.vue
Normal file
File diff suppressed because it is too large
Load Diff
731
src/views/simulationScene/database/modules/listColsConfig.js
Normal file
731
src/views/simulationScene/database/modules/listColsConfig.js
Normal file
|
@ -0,0 +1,731 @@
|
|||
// 配置列表要显示的列信息
|
||||
export var listGridInfo = {
|
||||
'Aircraft':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '国家',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '军种',
|
||||
key: 'operatorService',
|
||||
dataIndex: 'operatorService',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorService'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '服役年',
|
||||
key: 'yearCommissioned',
|
||||
dataIndex: 'yearCommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearCommissioned'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '退役年',
|
||||
key: 'yearDecommissioned',
|
||||
dataIndex: 'yearDecommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearDecommissioned'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Ship':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类别',
|
||||
key: 'category',
|
||||
dataIndex: 'category',
|
||||
scopedSlots: {
|
||||
customRender: 'category'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},{
|
||||
title: '所属军种',
|
||||
key: 'operatorService',
|
||||
dataIndex: 'operatorService',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorService'
|
||||
}
|
||||
},{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},{
|
||||
title: '服役年',
|
||||
key: 'yearCommissioned',
|
||||
dataIndex: 'yearCommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearCommissioned'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '退役年',
|
||||
key: 'yearDecommissioned',
|
||||
dataIndex: 'yearDecommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearDecommissioned'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Submarine':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类别',
|
||||
key: 'category',
|
||||
dataIndex: 'category',
|
||||
scopedSlots: {
|
||||
customRender: 'category'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},{
|
||||
title: '所属军种',
|
||||
key: 'operatorService',
|
||||
dataIndex: 'operatorService',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorService'
|
||||
}
|
||||
},{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},{
|
||||
title: '服役年',
|
||||
key: 'yearCommissioned',
|
||||
dataIndex: 'yearCommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearCommissioned'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '退役年',
|
||||
key: 'yearDecommissioned',
|
||||
dataIndex: 'yearDecommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearDecommissioned'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Weapon':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '生产年代',
|
||||
key: 'generation',
|
||||
dataIndex: 'generation',
|
||||
scopedSlots: {
|
||||
customRender: 'generation'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Facility':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类别',
|
||||
key: 'category',
|
||||
dataIndex: 'category',
|
||||
scopedSlots: {
|
||||
customRender: 'category'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},{
|
||||
title: '所属军种',
|
||||
key: 'operatorService',
|
||||
dataIndex: 'operatorService',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorService'
|
||||
}
|
||||
},{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},{
|
||||
title: '服役年',
|
||||
key: 'yearCommissioned',
|
||||
dataIndex: 'yearCommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearCommissioned'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '退役年',
|
||||
key: 'yearDecommissioned',
|
||||
dataIndex: 'yearDecommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearDecommissioned'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Satellite':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类别',
|
||||
key: 'category',
|
||||
dataIndex: 'category',
|
||||
scopedSlots: {
|
||||
customRender: 'category'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
},{
|
||||
title: '所属军种',
|
||||
key: 'operatorService',
|
||||
dataIndex: 'operatorService',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorService'
|
||||
}
|
||||
},{
|
||||
title: '造价(百万,¥)',
|
||||
key: 'cost',
|
||||
dataIndex: 'cost',
|
||||
scopedSlots: {
|
||||
customRender: 'cost'
|
||||
}
|
||||
},{
|
||||
title: '服役年',
|
||||
key: 'yearCommissioned',
|
||||
dataIndex: 'yearCommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearCommissioned'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '退役年',
|
||||
key: 'yearDecommissioned',
|
||||
dataIndex: 'yearDecommissioned',
|
||||
scopedSlots: {
|
||||
customRender: 'yearDecommissioned'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Comm':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Sensor':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
},{
|
||||
title: '最大作用距离(公里)',
|
||||
key: 'rangeMax',
|
||||
dataIndex: 'rangeMax',
|
||||
scopedSlots: {
|
||||
customRender: 'rangeMax'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Loadout':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '挂载方案的作用',
|
||||
key: 'loadoutRole',
|
||||
dataIndex: 'loadoutRole',
|
||||
scopedSlots: {
|
||||
customRender: 'loadoutRole'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Magazine':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '装甲',
|
||||
key: 'armorGeneral',
|
||||
dataIndex: 'armorGeneral',
|
||||
scopedSlots: {
|
||||
customRender: 'armorGeneral'
|
||||
}
|
||||
},{
|
||||
title: '补给间隔时间(秒)',
|
||||
key: 'rof',
|
||||
dataIndex: 'rof',
|
||||
scopedSlots: {
|
||||
customRender: 'rof'
|
||||
}
|
||||
},{
|
||||
title: '容量',
|
||||
key: 'capacity',
|
||||
dataIndex: 'capacity',
|
||||
scopedSlots: {
|
||||
customRender: 'capacity'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Mount':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Propulsion':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
'Warhead':{
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '炸药类型',
|
||||
key: 'explosivesType',
|
||||
dataIndex: 'explosivesType',
|
||||
scopedSlots: {
|
||||
customRender: 'explosivesType'
|
||||
}
|
||||
},{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},{
|
||||
title: '注释',
|
||||
key: 'comments',
|
||||
dataIndex: 'comments',
|
||||
scopedSlots: {
|
||||
customRender: 'comments'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
Laser: {
|
||||
cols:[
|
||||
{
|
||||
title: '#DBID',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
scopedSlots: {
|
||||
customRender: 'id'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
key: 'name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {
|
||||
customRender: 'name'
|
||||
}
|
||||
},{
|
||||
title: '类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
scopedSlots: {
|
||||
customRender: 'type'
|
||||
}
|
||||
},{
|
||||
title: '所属国',
|
||||
key: 'operatorCountry',
|
||||
dataIndex: 'operatorCountry',
|
||||
scopedSlots: {
|
||||
customRender: 'operatorCountry'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -3,7 +3,13 @@
|
|||
<Grid :columns="['400px', 1]">
|
||||
<a-card title="装备分类管理" class="my-card my-card-has-title" :bordered="false">
|
||||
<template #extra>
|
||||
<a-button type="primary" icon="plus" shape="circle" title="新增" @click="handleOpenAddZbflModal()"></a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
icon="plus"
|
||||
shape="circle"
|
||||
title="新增"
|
||||
@click="handleOpenAddZbflModal(-1)"
|
||||
></a-button>
|
||||
</template>
|
||||
<a-tree
|
||||
:treeData="zbfl.treeData"
|
||||
|
@ -13,15 +19,14 @@
|
|||
>
|
||||
<template #title="scope">
|
||||
<a-dropdown :trigger="['contextmenu']">
|
||||
<span>{{ scope.title }}</span>
|
||||
<span>{{ formatText(scope) }}</span>
|
||||
<span>{{ scope.title }}{{ $console.log(scope) }}</span>
|
||||
<template #overlay>
|
||||
<Flex class="contextmenu-zz">
|
||||
<a-button
|
||||
type="text-primary"
|
||||
icon="edit"
|
||||
title="编辑"
|
||||
@click="handleOpenEditZbflModal(scope.key)"
|
||||
@click="handleOpenEditZbflModal(scope.dataRef.data)"
|
||||
></a-button>
|
||||
<a-button
|
||||
type="text-primary"
|
||||
|
@ -35,6 +40,12 @@
|
|||
title="删除"
|
||||
@click="handleDeleteZbfl(scope.key, scope.title)"
|
||||
></a-button>
|
||||
<a-button
|
||||
type="text-primary"
|
||||
icon="unordered-list"
|
||||
title="详情"
|
||||
@click="handleViewZbfl(scope.key)"
|
||||
></a-button>
|
||||
</Flex>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
@ -43,20 +54,80 @@
|
|||
</a-card>
|
||||
<a-card title="装备管理" class="my-card my-card-has-title" :bordered="false">
|
||||
<template #extra>
|
||||
<a-button
|
||||
v-if="zb.entityType"
|
||||
type="primary"
|
||||
style="margin-right: 20px"
|
||||
@click="handleOpenAddZbModal(record)"
|
||||
>
|
||||
新增
|
||||
</a-button>
|
||||
<a-icon type="sync" style="font-size: 30px" @click="$refs['zb-table'].commitAction('query')" />
|
||||
</template>
|
||||
<AntQueryTable
|
||||
ref="zb-table"
|
||||
height="100%"
|
||||
:queryConfig="zb.queryConfig"
|
||||
:showTool="zb.showTool"
|
||||
:tableConfig="zb.tableConfig"
|
||||
></AntQueryTable>
|
||||
>
|
||||
<template #tablecell-action="{ record }">
|
||||
<a-button type="text-primary" icon="edit" title="编辑" @click="handleOpenEditZbModal(record)"></a-button>
|
||||
<a-button type="text-primary" icon="copy" title="复制" @click="handleOpenCopyZbModal(record)"></a-button>
|
||||
<a-popconfirm
|
||||
title="确定要删除该装备吗?"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
@confirm="handleDeleteZb(record)"
|
||||
>
|
||||
<a-button type="text-danger" icon="delete" title="删除"></a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</AntQueryTable>
|
||||
</a-card>
|
||||
</Grid>
|
||||
<AntFormModal
|
||||
:visible.sync="zbflModal.visible"
|
||||
:title="zbflModal.title"
|
||||
:formItems="zbflModal.formItems"
|
||||
:formRules="zbflModal.formRules"
|
||||
:formData="zbflModal.formData"
|
||||
:onSubmit="handleSubmitZbfl"
|
||||
@success="handleSubmitZbflSuccess"
|
||||
></AntFormModal>
|
||||
<a-modal
|
||||
v-model="zbflViewModal.visible"
|
||||
:title="zbflViewModal.title"
|
||||
width="900px"
|
||||
:maskClosable="false"
|
||||
:destroyOnClose="true"
|
||||
:footer="null"
|
||||
>
|
||||
<a-table
|
||||
:dataSource="zbflViewModal.data"
|
||||
:columns="[{ dataIndex: 'label', width: 150 }, { dataIndex: 'value' }]"
|
||||
:showHeader="false"
|
||||
bordered
|
||||
>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
|
||||
<InfoDataModal
|
||||
:visible="AECModal.visible"
|
||||
:modalTitle="AECModal.title"
|
||||
:opType="AECModal.opType"
|
||||
:entityType="zb.entityType"
|
||||
:parentId="zb.parentId"
|
||||
:dicData="dicData"
|
||||
:parentTableRowId="AECModal.opType === 1 ? undefined : AECModal.parentTableRowId"
|
||||
@closeModal="handleCLoseAECModal"
|
||||
/>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InfoDataModal from './modules/infoData.vue'
|
||||
|
||||
const listGridInfo = {
|
||||
Aircraft: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -67,6 +138,7 @@ const listGridInfo = {
|
|||
{ title: '造价(百万,¥)', dataIndex: 'cost' },
|
||||
{ title: '服役年', dataIndex: 'yearCommissioned' },
|
||||
{ title: '退役年', dataIndex: 'yearDecommissioned' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Ship: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -79,6 +151,7 @@ const listGridInfo = {
|
|||
{ title: '退役年', dataIndex: 'yearDecommissioned' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Submarine: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -91,6 +164,7 @@ const listGridInfo = {
|
|||
{ title: '退役年', dataIndex: 'yearDecommissioned' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Weapon: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -100,6 +174,7 @@ const listGridInfo = {
|
|||
{ title: '造价(百万,¥)', dataIndex: 'cost' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Facility: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -112,6 +187,7 @@ const listGridInfo = {
|
|||
{ title: '退役年', dataIndex: 'yearDecommissioned' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Satellite: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -124,12 +200,14 @@ const listGridInfo = {
|
|||
{ title: '退役年', dataIndex: 'yearDecommissioned' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Comm: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
{ title: '名称', dataIndex: 'name', width: 200, ellipsis: true },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Sensor: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -137,12 +215,14 @@ const listGridInfo = {
|
|||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ title: '最大作用距离(公里)', dataIndex: 'rangeMax' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Loadout: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
{ title: '名称', dataIndex: 'name', width: 200, ellipsis: true },
|
||||
{ title: '挂载方案的作用', dataIndex: 'loadoutRole' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Magazine: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -151,17 +231,20 @@ const listGridInfo = {
|
|||
{ title: '补给间隔时间(秒)', dataIndex: 'rof' },
|
||||
{ title: '容量', dataIndex: 'capacity' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Mount: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
{ title: '名称', dataIndex: 'name', width: 200, ellipsis: true },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Propulsion: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
{ title: '名称', dataIndex: 'name', width: 200, ellipsis: true },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Warhead: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
|
@ -169,17 +252,22 @@ const listGridInfo = {
|
|||
{ title: '炸药类型', dataIndex: 'explosivesType' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '注释', dataIndex: 'comments' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
Laser: [
|
||||
{ title: '#DBID', dataIndex: 'id', width: 80 },
|
||||
{ title: '名称', dataIndex: 'name', width: 200, ellipsis: true },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '所属国', dataIndex: 'operatorCountry' },
|
||||
{ dataIndex: 'action' },
|
||||
],
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Zbsjk',
|
||||
components: {
|
||||
InfoDataModal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
zbfl: {
|
||||
|
@ -202,29 +290,49 @@ export default {
|
|||
url: '/basedata/entity/getTreeNode',
|
||||
method: 'get',
|
||||
params: { parentId: '-1' },
|
||||
}).then((res) => ({ data: [{ key: 0, title: '根组织' }].concat(res.data) })),
|
||||
}).then((res) => ({ data: [{ key: -1, title: '根级分类' }].concat(res.data) })),
|
||||
valueKey: 'key',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '标识编码',
|
||||
prop: 'codeName',
|
||||
},
|
||||
{
|
||||
label: '装备分类名称',
|
||||
prop: 'name',
|
||||
prop: 'entityName',
|
||||
},
|
||||
],
|
||||
formRules: {
|
||||
codeName: [{ required: true, message: '请输入标识编码!', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请输入装备分类名称!', trigger: 'blur' }],
|
||||
},
|
||||
formData: {},
|
||||
},
|
||||
zbflViewModal: {
|
||||
visible: false,
|
||||
data: {},
|
||||
},
|
||||
zb: {
|
||||
entityType: '',
|
||||
parentId: '',
|
||||
queryConfig: false,
|
||||
queryConfig: {
|
||||
items: [
|
||||
{
|
||||
label: '国家/地区',
|
||||
prop: 'operatorCountry',
|
||||
component: 'AntOriginSelect',
|
||||
options: {
|
||||
dataSource: () =>
|
||||
this.$http({
|
||||
url: '/dicdata/operatorcountry/getList',
|
||||
method: 'get',
|
||||
}),
|
||||
labelKey: 'description',
|
||||
style: {
|
||||
width: '180px',
|
||||
},
|
||||
},
|
||||
},
|
||||
{ label: '名称', prop: 'name' },
|
||||
{ label: '#DBID', prop: 'id' },
|
||||
],
|
||||
},
|
||||
showTool: false,
|
||||
tableConfig: {
|
||||
query: (params) =>
|
||||
|
@ -237,16 +345,89 @@ export default {
|
|||
immediate: false,
|
||||
},
|
||||
},
|
||||
AECModal: {
|
||||
visible: false,
|
||||
title: '',
|
||||
opType: 1,
|
||||
parentTableRowId: 0,
|
||||
},
|
||||
|
||||
// 辅助数据
|
||||
dicData: {
|
||||
sensorcode: [], //传感器属性
|
||||
sensorcapability: [], //传感器能力
|
||||
sensorfrequency: [], //传感器频率(雷达照射频率、搜索和跟踪频率)
|
||||
dicsignaturetype: [], //信号特征类型
|
||||
dicDicDockingFacilitytype: [], //停靠设施类型
|
||||
operatorservice: [], // 军种
|
||||
satellitecategory: [], //卫星类别
|
||||
satellitetype: [], //卫星类型
|
||||
operatorcountry: [], // 国家
|
||||
dicfacilitycategory: [], // 地面兵力与设施类别
|
||||
diccargorytype: [], // 地面兵力与设施类型
|
||||
aircraftcode: [], //飞机-属性
|
||||
sensorType: [], //传感器-属性
|
||||
Shipcode: [], //水面舰艇-属性
|
||||
Submarinecode: [], // 潜艇-属性
|
||||
dicwarheadcaliber: [], //战斗部口径类型
|
||||
warheadtype: [], //战斗部类型
|
||||
dicsensorgeneration: [], //技术水平
|
||||
loadoutweather: [], //挂载方案使用天气要求
|
||||
loadouttimeofday: [], //挂载方案使用时间要求
|
||||
loadoutrole: [], //挂载方案的作用
|
||||
dicpropulsiontype: [], //推进系统的类型
|
||||
dictransfertype: [], //数据传输类型
|
||||
dicweapontarget: [], //有效目标
|
||||
weaponwra: [], //武器使用规则目标类型
|
||||
weaponwraweaponqty: [], //武器使用规则武器齐射数
|
||||
weaponwrashooterqty: [], //武器使用规则齐射最大发射单元数
|
||||
weaponcode: [], //武器-属性
|
||||
weapongeneration: [], //武器所属年代
|
||||
loadoutwinchestershotgun: [], //武器状态
|
||||
weapontype: [], //武器类型
|
||||
weaponwraselfdefencerange: [], //武器防御自防御距离
|
||||
dicpropulsionthrottle: [], //油门类型
|
||||
dicsubmarinephysicalsize: [], //潜艇停靠设施级别
|
||||
dicsubmarinecategory: [], //潜艇类别
|
||||
dicsubmarinetype: [], //潜艇类型
|
||||
lasertype: [], // 激光类别
|
||||
lasercode: [], // 激光属性
|
||||
diclasertarget: [], // 激光有效目标
|
||||
warheadexplosivestype: [], //炸药类型
|
||||
fuel: [], //燃油数据
|
||||
aircraftfacilityphysicalsize: [], //物理尺寸级别
|
||||
dicMobileunitcategory: [], //移动单位类别
|
||||
aircraftfacilitytype: [], //航空保障类型
|
||||
dicshipphysicalsize: [], //船舰(水面潜艇)停靠设施级别
|
||||
dicshipcargorytype: [], //船舰(水面潜艇)货物_类型
|
||||
shipcategory: [], //船舰(水面潜艇)类别
|
||||
shiptype: [], //船舰(水面潜艇)类型
|
||||
armortype: [], // 装甲级别
|
||||
aircraftrunwaylength: [], // 跑道长度
|
||||
radiatemodulationmode: [], //辐射源调制方式
|
||||
diccommcapability: [], //通信数据链属性
|
||||
diccommoperatestatus: [], //通信数据链工作状态
|
||||
sensorrole: [], //雷达类别种类
|
||||
aircraftcategory: [], // 飞机类别
|
||||
aircrafttype: [], // 飞机类型
|
||||
aircraftcockpitvisibility: [], // 驾驶员视线等级
|
||||
loadoutmissionprofile: [], //默认任务剖面
|
||||
dataModelcategory: [], //模型类别
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getZzTree()
|
||||
for (const key in this.dicData) {
|
||||
this.$http({
|
||||
url: '/dicdata/' + key + '/getList',
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
this.dicData[key] = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatText(scope) {
|
||||
console.log('----scope----', scope)
|
||||
return ''
|
||||
},
|
||||
async getZzTree() {
|
||||
try {
|
||||
const res = await this.$http({
|
||||
|
@ -263,6 +444,7 @@ export default {
|
|||
},
|
||||
handleChangeZbflSelected(data) {
|
||||
this.zb.entityType = data.entityType
|
||||
this.zb.entityName = data.entityName
|
||||
this.zb.parentId = data.id
|
||||
this.zb.tableConfig.columns = listGridInfo[data.entityType] || []
|
||||
this.$refs['zb-table'].commitAction('query')
|
||||
|
@ -270,30 +452,31 @@ export default {
|
|||
handleOpenAddZbflModal(parentId) {
|
||||
this.zbflModal.title = '新建装备分类'
|
||||
this.zbflModal.mode = 'add'
|
||||
this.zbflModal.formData = { parentId }
|
||||
this.zbflModal.formData = { parentId, createUserId: localStorage.getItem('userId') }
|
||||
this.zbflModal.visible = true
|
||||
},
|
||||
async handleOpenEditZbflModal(id) {
|
||||
try {
|
||||
const res = await this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
this.zbflModal.title = '编辑装备分类'
|
||||
this.zbflModal.mode = 'edit'
|
||||
this.zbflModal.formData = res.data
|
||||
this.zbflModal.visible = true
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.$message.error('未知错误,请重试')
|
||||
}
|
||||
handleOpenEditZbflModal(data) {
|
||||
this.zbflModal.title = '编辑装备分类'
|
||||
this.zbflModal.mode = 'edit'
|
||||
this.zbflModal.formData = { id: data.id, parentId: data.parentId, entityName: data.entityName }
|
||||
this.zbflModal.visible = true
|
||||
},
|
||||
handleSubmitZbfl(formData) {
|
||||
return this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/save`,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
})
|
||||
if (this.zbflModal.mode === 'edit') {
|
||||
return this.$http({
|
||||
url: '/basedata/entity/editName',
|
||||
method: 'get',
|
||||
params: formData,
|
||||
})
|
||||
}
|
||||
if (this.zbflModal.mode === 'add') {
|
||||
return this.$http({
|
||||
url: '/basedata/entity/add',
|
||||
method: 'get',
|
||||
params: formData,
|
||||
})
|
||||
}
|
||||
return Promise.reject(new Error('未知错误'))
|
||||
},
|
||||
handleSubmitZbflSuccess() {
|
||||
this.getZzTree()
|
||||
|
@ -302,12 +485,73 @@ export default {
|
|||
try {
|
||||
await this.$confirm({ content: `确定删除装备分类-${title}?` })
|
||||
await this.$http({
|
||||
url: `/baseData/fightPowerHierarchy/remove/${id}`,
|
||||
method: 'get',
|
||||
url: `/basedata/entity/remove`,
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
this.getZzTree()
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
async handleViewZbfl(id) {
|
||||
try {
|
||||
const res = await this.$http({
|
||||
url: '/basedata/entity/getInfo',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
})
|
||||
this.zbflViewModal.data = [
|
||||
{ label: '名称', value: res.data.entityName },
|
||||
{ label: '备注', value: res.data.remark },
|
||||
{ label: '创建人', value: res.data.createUserId },
|
||||
{ label: '创建时间', value: res.data.createTime },
|
||||
{ label: '类型', value: res.data.entityTypeName },
|
||||
{ label: '所有子分类个数', value: res.data.childrenCount },
|
||||
{ label: '包含所有的实体个数', value: res.data.entityCount },
|
||||
]
|
||||
this.zbflViewModal.title = res.data.entityName
|
||||
this.zbflViewModal.visible = true
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
handleOpenAddZbModal() {
|
||||
this.AECModal.opType = 1
|
||||
this.AECModal.title = '添加 ' + this.zb.entityName + ' 实体'
|
||||
this.AECModal.visible = true
|
||||
},
|
||||
handleOpenEditZbModal(record) {
|
||||
this.AECModal.opType = 3
|
||||
this.AECModal.parentTableRowId = record.id
|
||||
this.AECModal.title = '编辑 ' + record.name + ' 实体'
|
||||
this.AECModal.visible = true
|
||||
},
|
||||
handleOpenCopyZbModal(record) {
|
||||
this.AECModal.opType = 2
|
||||
this.AECModal.parentTableRowId = record.id
|
||||
this.AECModal.title = '复制 ' + record.name
|
||||
this.AECModal.visible = true
|
||||
},
|
||||
handleCLoseAECModal() {
|
||||
this.AECModal.visible = false
|
||||
this.AECModal.title = ''
|
||||
this.AECModal.opType = 0
|
||||
this.$refs['zb-table'].commitAction('query')
|
||||
},
|
||||
async handleDeleteZb(record) {
|
||||
try {
|
||||
await this.$http({
|
||||
url: '/basedata/' + this.zb.entityType.toLowerCase() + '/remove',
|
||||
method: 'delete',
|
||||
params: { Guid: record.guid },
|
||||
})
|
||||
this.$messge.success('删除成功')
|
||||
this.$refs['zb-table'].commitAction('query')
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user