|
@@ -15,7 +15,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="appType" label="Type">
|
|
|
<el-select v-if="!isView" v-model="formData.appType" placeholder="Please select">
|
|
|
- <el-option v-for="item in typeData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-option v-for="item in typeData" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<span v-else>{{ formData.appType }}</span>
|
|
|
</el-form-item>
|
|
@@ -45,7 +45,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="deptName" label="Dept">
|
|
|
<el-select v-if="!isView" v-model="formData.deptName" placeholder="placeholder">
|
|
|
- <el-option v-for="item in orgData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-option v-for="item in orgData" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<span v-else>{{ formData.deptName }}</span>
|
|
|
</el-form-item>
|
|
@@ -61,7 +61,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="activeFlag" label="Active">
|
|
|
<el-select v-if="!isView" v-model="formData.activeFlag" placeholder="placeholder">
|
|
|
- <el-option v-for="item in activeFlagData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-option v-for="item in activeFlagData" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<span v-else>{{ formData.activeFlag }}</span>
|
|
|
</el-form-item>
|
|
@@ -69,7 +69,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="policeCategory" label="Category">
|
|
|
<el-select v-if="!isView" v-model="formData.policeCategory" placeholder="placeholder">
|
|
|
- <el-option v-for="item in policeCategoryData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-option v-for="item in policeCategoryData" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<span v-else>{{ formData.policeCategory }}</span>
|
|
|
</el-form-item>
|
|
@@ -78,7 +78,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="icon" label="Icon" style="height: 100px;">
|
|
|
- <upload-file v-if="!isView" file-type="1" :on-success="uploadSuccess" :on-error="uploadError" />
|
|
|
+ <upload-file v-if="!isView" :file-type="fileType" :on-success="uploadSuccess" :on-error="uploadError" />
|
|
|
<el-input v-model="formData.icon" type="hidden" style="display:none" />
|
|
|
<div v-if="!isNull(formData.icon)">
|
|
|
<i class="upload-success el-icon-circle-check" />{{ fileName }}
|
|
@@ -97,7 +97,7 @@
|
|
|
<script>
|
|
|
import { isNull, isObject } from '@/utils/convert'
|
|
|
|
|
|
-import { pushSaveSystem } from '@/api/system'
|
|
|
+import { pushSaveBusiness } from '@/api/business'
|
|
|
|
|
|
import UploadFile from '@/components/Upload/UploadFile'
|
|
|
|
|
@@ -116,6 +116,7 @@ export default {
|
|
|
// dialog
|
|
|
visible: false,
|
|
|
isView: true,
|
|
|
+ fileType: '97', // 99: Sytem 97: Business
|
|
|
type: '',
|
|
|
title: 'Edit',
|
|
|
formName: 'editForm',
|
|
@@ -160,9 +161,9 @@ export default {
|
|
|
fileName: '',
|
|
|
action: 'add',
|
|
|
// select:
|
|
|
- orgData: [{ value: '1', label: 'Test1' }, { value: '0', label: 'Test0' }],
|
|
|
+ orgData: [{ id: 1, label: 'Test1' }, { id: 0, label: 'Test0' }],
|
|
|
policeCategoryData: [],
|
|
|
- activeFlagData: [{ value: '1', label: 'Active' }, { value: '0', label: 'Deactive' }],
|
|
|
+ activeFlagData: [{ id: 1, label: 'Active' }, { id: 0, label: 'Deactive' }],
|
|
|
// others
|
|
|
loading: false
|
|
|
}
|
|
@@ -220,7 +221,7 @@ export default {
|
|
|
this.$refs[this.formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
- pushSaveSystem(this.action, this.formData).then(res => {
|
|
|
+ pushSaveBusiness(this.action, this.formData).then(res => {
|
|
|
this.$refs[this.formName].resetFields()
|
|
|
this.visible = false
|
|
|
this.loading = false
|