提交
This commit is contained in:
@@ -17,8 +17,8 @@ export async function updateSchoolStatus(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 保存场地状态
|
||||
export function savePlace(data) {
|
||||
// 新增
|
||||
export function addPlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'post',
|
||||
@@ -27,6 +27,16 @@ export function savePlace(data) {
|
||||
}
|
||||
|
||||
|
||||
// 修改场地
|
||||
export function updatePlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询场地
|
||||
export function getAllPlaces(param) {
|
||||
return request({
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
</template>
|
||||
<!-- eslint-disable no-undef -->
|
||||
<script>
|
||||
import { getMapData, savePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||
import { getMapData, addPlace, updatePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||
export default {
|
||||
name: 'Place',
|
||||
data() {
|
||||
@@ -427,7 +427,7 @@ export default {
|
||||
// 保存接口
|
||||
if (this.checkPlaceFormValidate()) {
|
||||
// 先访问接口,返回id插入placeForm
|
||||
const resp = await savePlace(this.placeForm);
|
||||
const resp = this.savePlace(this.placeForm);
|
||||
if (resp.code != 200) {
|
||||
return;
|
||||
} else {
|
||||
@@ -473,6 +473,13 @@ export default {
|
||||
this.placeMarkerList = tmpArr1;
|
||||
}
|
||||
},
|
||||
async savePlace(item) {
|
||||
if (item.placeId) {
|
||||
return updatePlace(item);
|
||||
} else {
|
||||
return addPlace(item)
|
||||
}
|
||||
},
|
||||
checkPlaceFormValidate() {
|
||||
const valid = [];
|
||||
if (!this.placeForm.name) {
|
||||
@@ -570,7 +577,7 @@ export default {
|
||||
},
|
||||
// 修改场地状态
|
||||
async changePlaceStatus(item) {
|
||||
const resp = await savePlace(item);
|
||||
const resp = await updatePlace(item);
|
||||
if (resp.code == 200) {
|
||||
this.resetMarkers();
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ export default {
|
||||
methods: {
|
||||
async init(info) {
|
||||
this.title = info.schoolName + '-' + info.name + '-班型报价';
|
||||
const resp = await getClassTypeTableList({
|
||||
const resp = await getAllList({
|
||||
schoolId: info.schoolId,
|
||||
placeId: info.placeId,
|
||||
status: '0'
|
||||
});
|
||||
if (resp.code == 200) {
|
||||
this.getAllList = resp.data
|
||||
this.classTypeList = resp.data
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
},
|
||||
// 释放线索操作
|
||||
handleDiscard(item) {
|
||||
his.$confirm('是否确认释放该条线索(“' + item.name + '/' + item.phone + '”)到公海?', '警告', {
|
||||
this.$confirm('是否确认释放该条线索(“' + item.name + '/' + item.phone + '”)到公海?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<span slot="footer">
|
||||
<el-button type="primary" v-if="modalForm.state == 1 && checkTab == 'two'" :disabled="!canSubmit" :loading="loading" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="modalForm.state == 1 && checkTab == 'two'" :disabled="!canSubmit" :loading="loading" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button type="primary" v-if="modalForm.checkState == 1 && checkTab == 'two'" :disabled="!canSubmit" :loading="loading" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="modalForm.checkState == 1 && checkTab == 'two'" :disabled="!canSubmit" :loading="loading" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
Reference in New Issue
Block a user