NEZ-1664 feat: asset model 新增补充

This commit is contained in:
@changcode
2022-03-11 18:16:07 +08:00
parent 878207d722
commit 8b0a334dde
4 changed files with 31 additions and 5 deletions

View File

@@ -199,8 +199,9 @@ export function arrLength (rule, value, callback) { // 校验数组
} }
export function sysObjectIdInput (rule, value, callback) { export function sysObjectIdInput (rule, value, callback) {
const sysId = /^(\d+\.)+\d${color}/ const sysId = /^(\d{1,9}\.){0,}[\d]+$/
setTimeout(() => { setTimeout(() => {
if (value == '') return callback()
if (sysId.test(value)) { if (sysId.test(value)) {
callback() callback()
} else { } else {

View File

@@ -21,8 +21,8 @@
</el-form-item> </el-form-item>
<!-- type --> <!-- type -->
<el-form-item :label='$t("overall.type")' prop="typeId"> <el-form-item :label='$t("overall.type")' prop="typeId">
<el-select value-key="id" class="right-box__select" popper-class="right-box-select-top prevent-clickoutside" v-model="editModel.typeId" placeholder="" size="small"> <el-select value-key="id" allow-create class="right-box__select" popper-class="right-box-select-top prevent-clickoutside" :filterable="true" v-model="editModel.typeId" placeholder="" size="small" id="module-box-input-project">
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option :id="'module-project-'+item.type.id" v-for="(item, index) in typeDataList" :key="index" :label="item.type.name" :value="item.type.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- ChartTemplate --> <!-- ChartTemplate -->
@@ -98,7 +98,7 @@ export default {
editModel: {}, editModel: {},
brandList: [], // brand 列表数据 brandList: [], // brand 列表数据
editModule: {}, editModule: {},
typeList: [], typeDataList: [],
chartlList: [], // chart 列表数据 chartlList: [], // chart 列表数据
ChartSearchShowFields: [ // ChartSearch 下拉搜索表头 ChartSearchShowFields: [ // ChartSearch 下拉搜索表头
{ title: 'ID', data: 'id' }, { title: 'ID', data: 'id' },
@@ -131,6 +131,9 @@ export default {
deep: true, deep: true,
immediate: true, immediate: true,
handler (n) { handler (n) {
if (n.id) {
this.editModel.typeId = n.type.name
}
this.isEdit = true this.isEdit = true
this.editModel = JSON.parse(JSON.stringify(n)) this.editModel = JSON.parse(JSON.stringify(n))
} }
@@ -138,6 +141,7 @@ export default {
}, },
created () { created () {
this.getBrandList() this.getBrandList()
this.modelTypeList()
this.ChartTemplateList() this.ChartTemplateList()
}, },
methods: { methods: {
@@ -227,6 +231,11 @@ export default {
this.$get('visual/panel/chart', { pageSize: -1, varType: 1, panelId: 0, groupId: 0 }).then(res => { this.$get('visual/panel/chart', { pageSize: -1, varType: 1, panelId: 0, groupId: 0 }).then(res => {
this.chartlList = res.data.list this.chartlList = res.data.list
}) })
},
modelTypeList () {
this.$get('asset/model', { pageSize: -1, pageNo: 1 }).then(res => {
this.typeDataList = res.data.list
})
} }
} }
} }

View File

@@ -42,7 +42,10 @@
</template> </template>
</template> </template>
<template v-else-if="item.prop === 'brand'"> <template v-else-if="item.prop === 'brand'">
{{scope.row.brand.name}} {{scope.row.brand.name}}
</template>
<template v-else-if="item.prop === 'type'">
{{scope.row.type.name}}
</template> </template>
<span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span> <span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
<template v-else-if="item.prop === 'assetNum'"> <template v-else-if="item.prop === 'assetNum'">

View File

@@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: "licenseGen"
}
</script>
<style scoped>
</style>