|
@@ -18,8 +18,7 @@
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-search"
|
|
icon="el-icon-search"
|
|
@click="onSubmit"
|
|
@click="onSubmit"
|
|
- >查询</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >查询</el-button>
|
|
<!-- <el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>-->
|
|
<!-- <el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>-->
|
|
<el-popover
|
|
<el-popover
|
|
v-model:visible="deleteVisible"
|
|
v-model:visible="deleteVisible"
|
|
@@ -28,12 +27,16 @@
|
|
>
|
|
>
|
|
<p>确定要删除吗?</p>
|
|
<p>确定要删除吗?</p>
|
|
<div style="text-align: right; margin: 0">
|
|
<div style="text-align: right; margin: 0">
|
|
- <el-button size="mini" type="text" @click="deleteVisible = false"
|
|
|
|
- >取消</el-button
|
|
|
|
- >
|
|
|
|
- <el-button size="mini" type="primary" @click="onDelete"
|
|
|
|
- >确定</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="deleteVisible = false"
|
|
|
|
+ >取消</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="onDelete"
|
|
|
|
+ >确定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-popover>
|
|
</el-popover>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -55,6 +58,12 @@
|
|
}}</template>
|
|
}}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="站点名称" prop="name" />
|
|
<el-table-column label="站点名称" prop="name" />
|
|
|
|
+ <el-table-column label="站点满分值" prop="unitMaxIntegral">
|
|
|
|
+ <template #default="scope">{{ scope.row.unitMaxIntegral/100 }}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="站点扣分" prop="unitIntegral">
|
|
|
|
+ <template #default="scope">{{ scope.row.unitIntegral/100 }}</template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="站点定位" prop="position" width="150">
|
|
<el-table-column label="站点定位" prop="position" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-link
|
|
<el-link
|
|
@@ -92,30 +101,27 @@
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
class="table-button"
|
|
class="table-button"
|
|
@click="updatePlace(scope.row)"
|
|
@click="updatePlace(scope.row)"
|
|
- >变更
|
|
|
|
|
|
+ >变更
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
size="mini"
|
|
size="mini"
|
|
@click="deleteRow(scope.row)"
|
|
@click="deleteRow(scope.row)"
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >删除</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="info"
|
|
type="info"
|
|
class="mt10 ml0"
|
|
class="mt10 ml0"
|
|
icon="el-icon-circle-plus-outline"
|
|
icon="el-icon-circle-plus-outline"
|
|
size="mini"
|
|
size="mini"
|
|
@click="addProblem(scope.row)"
|
|
@click="addProblem(scope.row)"
|
|
- >添加问题</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >添加问题</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-tickets"
|
|
icon="el-icon-tickets"
|
|
size="mini"
|
|
size="mini"
|
|
@click="ProblemList(scope.row)"
|
|
@click="ProblemList(scope.row)"
|
|
- >问题管理</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >问题管理</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -151,18 +157,21 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="满分值:">
|
|
|
|
+ <el-input v-model="formData.unitMaxIntegral" />
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="地址:">
|
|
<el-form-item label="地址:">
|
|
<el-input v-model="formData.region" clearable placeholder="请输入" />
|
|
<el-input v-model="formData.region" clearable placeholder="请输入" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="区域:">
|
|
<el-form-item label="区域:">
|
|
- <el-cascader
|
|
|
|
- :options="optionsArea"
|
|
|
|
- v-model="formData.organCode"
|
|
|
|
|
|
+ <el-cascader
|
|
|
|
+ v-model="formData.organCode"
|
|
|
|
+ :options="optionsArea"
|
|
:show-all-levels="false"
|
|
:show-all-levels="false"
|
|
- :props="{ expandTrigger: 'hover', value: 'code', label: 'name' }"
|
|
|
|
|
|
+ :props="{ expandTrigger: 'hover', value: 'code', label: 'name' }"
|
|
|
|
|
|
@change="changeArea"
|
|
@change="changeArea"
|
|
- ></el-cascader>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -176,8 +185,7 @@
|
|
<!-- 问题管理开始 -->
|
|
<!-- 问题管理开始 -->
|
|
<el-dialog v-model="dialogProblemVisible" title="弹窗操作">
|
|
<el-dialog v-model="dialogProblemVisible" title="弹窗操作">
|
|
<el-table :data="problemData" border>
|
|
<el-table :data="problemData" border>
|
|
- <el-table-column prop="placeProText" label="问题名称">
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="placeProText" label="问题名称" />
|
|
<el-table-column label="操作" width="160">
|
|
<el-table-column label="操作" width="160">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -186,15 +194,14 @@
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
class="table-button"
|
|
class="table-button"
|
|
@click="updateProblem(scope.row)"
|
|
@click="updateProblem(scope.row)"
|
|
- >变更
|
|
|
|
|
|
+ >变更
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
size="mini"
|
|
size="mini"
|
|
@click="deleteProblem(scope.row)"
|
|
@click="deleteProblem(scope.row)"
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ >删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -212,288 +219,279 @@ import {
|
|
updatePlace,
|
|
updatePlace,
|
|
findPlace,
|
|
findPlace,
|
|
getPlaceList,
|
|
getPlaceList,
|
|
-} from "@/api/place"; // 此处请自行替换地址
|
|
|
|
|
|
+} from '@/api/place' // 此处请自行替换地址
|
|
import {
|
|
import {
|
|
createPlacePro,
|
|
createPlacePro,
|
|
deletePlacePro,
|
|
deletePlacePro,
|
|
- deletePlaceProByIds,
|
|
|
|
- updatePlacePro,
|
|
|
|
- findPlacePro,
|
|
|
|
- getPlaceProList,
|
|
|
|
-} from "@/api/placePro"; // 此处请自行替换地址
|
|
|
|
|
|
+ updatePlacePro
|
|
|
|
+} from '@/api/placePro' // 此处请自行替换地址
|
|
|
|
|
|
-import { areaList, getOrganizationList } from "@/api/organization"
|
|
|
|
-import infoList from "@/mixins/infoList";
|
|
|
|
-import { getDict } from "@/utils/dictionary";
|
|
|
|
|
|
+import { areaList } from '@/api/organization'
|
|
|
|
+import infoList from '@/mixins/infoList'
|
|
|
|
+import { getDict } from '@/utils/dictionary'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "Place",
|
|
|
|
- dicts: ["site_type"],
|
|
|
|
|
|
+ name: 'Place',
|
|
|
|
+ dicts: ['site_type'],
|
|
mixins: [infoList],
|
|
mixins: [infoList],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- currentID: 0, //当前问题ID
|
|
|
|
|
|
+ currentID: 0, // 当前问题ID
|
|
|
|
|
|
listApi: getPlaceList,
|
|
listApi: getPlaceList,
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
dialogProblemVisible: false,
|
|
dialogProblemVisible: false,
|
|
- problemData: [], //问题列表
|
|
|
|
- type: "",
|
|
|
|
|
|
+ problemData: [], // 问题列表
|
|
|
|
+ type: '',
|
|
siteType: [],
|
|
siteType: [],
|
|
deleteVisible: false,
|
|
deleteVisible: false,
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
formData: {
|
|
formData: {
|
|
- name: "",
|
|
|
|
- position: "",
|
|
|
|
- type: "",
|
|
|
|
- region: "",
|
|
|
|
- organCode: ""
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ position: '',
|
|
|
|
+ type: '',
|
|
|
|
+ region: '',
|
|
|
|
+ organCode: ''
|
|
},
|
|
},
|
|
formDataProblem: {
|
|
formDataProblem: {
|
|
placeId: 0,
|
|
placeId: 0,
|
|
- placeProText: "",
|
|
|
|
|
|
+ placeProText: '',
|
|
},
|
|
},
|
|
optionsArea: []
|
|
optionsArea: []
|
|
- };
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
- this.siteType = await getDict("site_type");
|
|
|
|
- // await this.getTableData();
|
|
|
|
-
|
|
|
|
- await this.getTableData();
|
|
|
|
-
|
|
|
|
|
|
+ this.siteType = await getDict('site_type')
|
|
|
|
+ await this.getTableData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
openMapHandle(position, name, region) {
|
|
openMapHandle(position, name, region) {
|
|
window.open(
|
|
window.open(
|
|
- "https://apis.map.qq.com/uri/v1/marker?marker=coord:" +
|
|
|
|
|
|
+ 'https://apis.map.qq.com/uri/v1/marker?marker=coord:' +
|
|
position +
|
|
position +
|
|
- ";title:" +
|
|
|
|
|
|
+ ';title:' +
|
|
name +
|
|
name +
|
|
- ";addr:" +
|
|
|
|
|
|
+ ';addr:' +
|
|
region
|
|
region
|
|
- );
|
|
|
|
|
|
+ )
|
|
},
|
|
},
|
|
// 条件搜索前端看此方法
|
|
// 条件搜索前端看此方法
|
|
onSubmit() {
|
|
onSubmit() {
|
|
- this.page = 1;
|
|
|
|
- this.pageSize = 10;
|
|
|
|
- this.getTableData();
|
|
|
|
|
|
+ this.page = 1
|
|
|
|
+ this.pageSize = 10
|
|
|
|
+ this.getTableData()
|
|
},
|
|
},
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
- this.multipleSelection = val;
|
|
|
|
|
|
+ this.multipleSelection = val
|
|
},
|
|
},
|
|
deleteRow(row) {
|
|
deleteRow(row) {
|
|
- this.$confirm("确定要删除吗?", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
|
|
+ this.$confirm('确定要删除吗?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.deletePlace(row);
|
|
|
|
- });
|
|
|
|
|
|
+ this.deletePlace(row)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
async onDelete() {
|
|
async onDelete() {
|
|
- const ids = [];
|
|
|
|
|
|
+ const ids = []
|
|
if (this.multipleSelection.length === 0) {
|
|
if (this.multipleSelection.length === 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "warning",
|
|
|
|
- message: "请选择要删除的数据",
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请选择要删除的数据',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
this.multipleSelection &&
|
|
this.multipleSelection &&
|
|
this.multipleSelection.map((item) => {
|
|
this.multipleSelection.map((item) => {
|
|
- ids.push(item.ID);
|
|
|
|
- });
|
|
|
|
- const res = await deletePlaceByIds({ ids });
|
|
|
|
|
|
+ ids.push(item.ID)
|
|
|
|
+ })
|
|
|
|
+ const res = await deletePlaceByIds({ ids })
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "success",
|
|
|
|
- message: "删除成功",
|
|
|
|
- });
|
|
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ })
|
|
if (this.tableData.length === ids.length && this.page > 1) {
|
|
if (this.tableData.length === ids.length && this.page > 1) {
|
|
- this.page--;
|
|
|
|
|
|
+ this.page--
|
|
}
|
|
}
|
|
- this.deleteVisible = false;
|
|
|
|
- this.getTableData();
|
|
|
|
|
|
+ this.deleteVisible = false
|
|
|
|
+ this.getTableData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async updatePlace(row) {
|
|
async updatePlace(row) {
|
|
- const res = await findPlace({ ID: row.ID });
|
|
|
|
- this.type = "update";
|
|
|
|
|
|
+ const res = await findPlace({ ID: row.ID })
|
|
|
|
+ this.type = 'update'
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- this.formData = res.data.replace;
|
|
|
|
- this.dialogFormVisible = true;
|
|
|
|
|
|
+ this.formData = res.data.replace
|
|
|
|
+ this.formData.unitMaxIntegral = this.formData.unitMaxIntegral / 100
|
|
|
|
+ this.dialogFormVisible = true
|
|
}
|
|
}
|
|
-
|
|
|
|
- let list = await areaList({code: '1307'})
|
|
|
|
- console.log(list)
|
|
|
|
- if(list.code == 0) {
|
|
|
|
- this.optionsArea = list.data.treeMap
|
|
|
|
|
|
|
|
|
|
+ const list = await areaList({ code: '1307' })
|
|
|
|
+ console.log(list)
|
|
|
|
+ if (list.code == 0) {
|
|
|
|
+ this.optionsArea = list.data.treeMap
|
|
}
|
|
}
|
|
// console.log(this.optionsArea)
|
|
// console.log(this.optionsArea)
|
|
},
|
|
},
|
|
closeDialog() {
|
|
closeDialog() {
|
|
- this.dialogFormVisible = false;
|
|
|
|
|
|
+ this.dialogFormVisible = false
|
|
this.formData = {
|
|
this.formData = {
|
|
- name: "",
|
|
|
|
- position: "",
|
|
|
|
- type: "",
|
|
|
|
- region: "",
|
|
|
|
- };
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ position: '',
|
|
|
|
+ type: '',
|
|
|
|
+ region: '',
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async deletePlace(row) {
|
|
async deletePlace(row) {
|
|
- const res = await deletePlace({ ID: row.ID });
|
|
|
|
|
|
+ const res = await deletePlace({ ID: row.ID })
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "success",
|
|
|
|
- message: "删除成功",
|
|
|
|
- });
|
|
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ })
|
|
if (this.tableData.length === 1 && this.page > 1) {
|
|
if (this.tableData.length === 1 && this.page > 1) {
|
|
- this.page--;
|
|
|
|
|
|
+ this.page--
|
|
}
|
|
}
|
|
- this.getTableData();
|
|
|
|
|
|
+ this.getTableData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async enterDialog() {
|
|
async enterDialog() {
|
|
- let res;
|
|
|
|
|
|
+ let res
|
|
switch (this.type) {
|
|
switch (this.type) {
|
|
- case "create":
|
|
|
|
- res = await createPlace(this.formData);
|
|
|
|
- break;
|
|
|
|
- case "update":
|
|
|
|
- res = await updatePlace(this.formData);
|
|
|
|
- break;
|
|
|
|
|
|
+ case 'create':
|
|
|
|
+ res = await createPlace(this.formData)
|
|
|
|
+ break
|
|
|
|
+ case 'update':
|
|
|
|
+ res = await updatePlace(this.formData)
|
|
|
|
+ break
|
|
default:
|
|
default:
|
|
- res = await createPlace(this.formData);
|
|
|
|
- break;
|
|
|
|
|
|
+ res = await createPlace(this.formData)
|
|
|
|
+ break
|
|
}
|
|
}
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "success",
|
|
|
|
- message: "创建/更改成功",
|
|
|
|
- });
|
|
|
|
- this.closeDialog();
|
|
|
|
- this.getTableData();
|
|
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '创建/更改成功',
|
|
|
|
+ })
|
|
|
|
+ this.closeDialog()
|
|
|
|
+ this.getTableData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
openDialog() {
|
|
openDialog() {
|
|
- this.type = "create";
|
|
|
|
- this.dialogFormVisible = true;
|
|
|
|
|
|
+ this.type = 'create'
|
|
|
|
+ this.dialogFormVisible = true
|
|
},
|
|
},
|
|
// 添加问题
|
|
// 添加问题
|
|
addProblem(row) {
|
|
addProblem(row) {
|
|
- this.$prompt("请输入站点问题", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
-
|
|
|
|
|
|
+ this.$prompt('请输入站点问题', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+
|
|
})
|
|
})
|
|
.then(({ value }) => {
|
|
.then(({ value }) => {
|
|
- if (value == "" || value == null) {
|
|
|
|
|
|
+ if (value == '' || value == null) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "error",
|
|
|
|
- message: "你的问题不能为空",
|
|
|
|
- });
|
|
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '你的问题不能为空',
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
- this.formDataProblem.placeId = row.ID;
|
|
|
|
- this.formDataProblem.placeProText = value;
|
|
|
|
|
|
+ this.formDataProblem.placeId = row.ID
|
|
|
|
+ this.formDataProblem.placeProText = value
|
|
// console.log(this.formDataProblem)
|
|
// console.log(this.formDataProblem)
|
|
createPlacePro(this.formDataProblem).then((res) => {
|
|
createPlacePro(this.formDataProblem).then((res) => {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "success",
|
|
|
|
|
|
+ type: 'success',
|
|
message: res.msg,
|
|
message: res.msg,
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "info",
|
|
|
|
- message: "取消输入",
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '取消输入',
|
|
|
|
+ })
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
// 问题管理
|
|
// 问题管理
|
|
async ProblemList(row) {
|
|
async ProblemList(row) {
|
|
// console.log(row)
|
|
// console.log(row)
|
|
- this.dialogProblemVisible = true;
|
|
|
|
|
|
+ this.dialogProblemVisible = true
|
|
this.currentID = this.currentID == 0 ? row.ID : this.currentID
|
|
this.currentID = this.currentID == 0 ? row.ID : this.currentID
|
|
- let res = await findPlace({ ID: this.currentID });
|
|
|
|
|
|
+ const res = await findPlace({ ID: this.currentID })
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
- this.problemData = res.data.replace.proList;
|
|
|
|
|
|
+ this.problemData = res.data.replace.proList
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
// 修改更新问题
|
|
// 修改更新问题
|
|
async updateProblem(row) {
|
|
async updateProblem(row) {
|
|
console.log(row)
|
|
console.log(row)
|
|
- this.$prompt("请修改站点问题", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
|
+ this.$prompt('请修改站点问题', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
inputValue: row.placeProText
|
|
inputValue: row.placeProText
|
|
- }).then( async(value) => {
|
|
|
|
|
|
+ }).then(async(value) => {
|
|
console.log(value)
|
|
console.log(value)
|
|
- if (value == "" || value == null) {
|
|
|
|
|
|
+ if (value == '' || value == null) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '你的问题不能为空',
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.formDataProblem.ID = row.ID
|
|
|
|
+ this.formDataProblem.placeId = row.placeId
|
|
|
|
+ this.formDataProblem.placeProText = value.value
|
|
|
|
+ // console.log(this.formDataProblem)
|
|
|
|
+
|
|
|
|
+ // console.log(this.formDataProblem)
|
|
|
|
+ const res = await updatePlacePro(this.formDataProblem)
|
|
|
|
+ if (res.code == 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "error",
|
|
|
|
- message: "你的问题不能为空",
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- this.formDataProblem.ID = row.ID
|
|
|
|
- this.formDataProblem.placeId = row.placeId;
|
|
|
|
- this.formDataProblem.placeProText = value.value;
|
|
|
|
- // console.log(this.formDataProblem)
|
|
|
|
-
|
|
|
|
- // console.log(this.formDataProblem)
|
|
|
|
- let res = await updatePlacePro(this.formDataProblem)
|
|
|
|
- if( res.code == 0 ) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: res.msg,
|
|
|
|
- });
|
|
|
|
- this.ProblemList()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: res.msg,
|
|
|
|
+ })
|
|
|
|
+ this.ProblemList()
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ })
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "info",
|
|
|
|
- message: "取消输入",
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '取消输入',
|
|
|
|
+ })
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
// 删除问题
|
|
// 删除问题
|
|
async deleteProblem(row) {
|
|
async deleteProblem(row) {
|
|
- this.$confirm("确定要删除吗?", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
- }).then(async () => {
|
|
|
|
- let res = await deletePlacePro({ ID: row.ID });
|
|
|
|
-
|
|
|
|
|
|
+ this.$confirm('确定要删除吗?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(async() => {
|
|
|
|
+ const res = await deletePlacePro({ ID: row.ID })
|
|
|
|
+
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "success",
|
|
|
|
- message: "删除成功",
|
|
|
|
- });
|
|
|
|
- this.ProblemList()
|
|
|
|
-
|
|
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ })
|
|
|
|
+ this.ProblemList()
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
- //区域更改
|
|
|
|
|
|
+ // 区域更改
|
|
changeArea(value) {
|
|
changeArea(value) {
|
|
console.log(value[0])
|
|
console.log(value[0])
|
|
this.formData.organCode = value[0]
|
|
this.formData.organCode = value[0]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-};
|
|
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style>
|
|
<style>
|