修改
This commit is contained in:
parent
8abaeab59a
commit
14a5c616a9
@ -383,7 +383,6 @@ export default {
|
||||
if (response.data.goodAttributeDetailsLists) {
|
||||
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
||||
}
|
||||
// console.log(this.form.parentIdList)
|
||||
// this.form.goodsCategoryId = this.form.goodsCategoryName
|
||||
// this.form.value = this.form.goodsCategoryId
|
||||
// this.form.label = this.form.goodsCategoryName
|
||||
|
||||
@ -718,7 +718,6 @@ export default {
|
||||
this.form.nurseStationDepartmentList[0].nurseStationName;
|
||||
this.form.phone = this.form.nurseStationDepartmentList[0].phone;
|
||||
}
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
|
||||
@ -535,7 +535,6 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
console.log(row);
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function() {
|
||||
|
||||
@ -23,21 +23,16 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item label="所属区域" prop="areaCode">
|
||||
<el-select
|
||||
v-model="queryParams.province"
|
||||
clearable
|
||||
placeholder="请选择省"
|
||||
>
|
||||
<el-select v-model="queryParams.province" clearable placeholder="请选择省">
|
||||
<el-option
|
||||
v-for="item in arealist"
|
||||
:key="item.id"
|
||||
:label="item.areaName"
|
||||
:value="item.id"
|
||||
@click.native="province(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
@ -52,8 +47,7 @@
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickcity(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="queryParams.area"
|
||||
@ -67,8 +61,7 @@
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickarea(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="queryParams.areaCode"
|
||||
@ -82,15 +75,10 @@
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickstreet(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="社区名称"
|
||||
prop="communityName"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
<el-form-item label="社区名称" prop="communityName" style="margin-left: 20px">
|
||||
<el-input
|
||||
v-model="queryParams.communityName"
|
||||
placeholder="请输入社区名称"
|
||||
@ -100,16 +88,8 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -122,8 +102,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:communityInfo:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -134,8 +113,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:communityInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -146,8 +124,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:communityInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -157,13 +134,9 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:communityInfo:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@ -174,24 +147,12 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<!-- <el-table-column label="所属区域编码" align="center" prop="areaCode" />
|
||||
<el-table-column label="社区编码" align="center" prop="communityCode" /> -->
|
||||
<el-table-column label="所属区域" align="center" prop="area" width="300"/>
|
||||
<el-table-column label="社区编码" align="center" prop="communityCode" />-->
|
||||
<el-table-column label="所属区域" align="center" prop="area" width="300" />
|
||||
<el-table-column label="社区名称" align="center" prop="communityName" />
|
||||
<el-table-column
|
||||
label="社区经度"
|
||||
align="center"
|
||||
prop="communityLongitude"
|
||||
/>
|
||||
<el-table-column
|
||||
label="社区纬度"
|
||||
align="center"
|
||||
prop="communityLatitude"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<el-table-column label="社区经度" align="center" prop="communityLongitude" />
|
||||
<el-table-column label="社区纬度" align="center" prop="communityLatitude" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -199,16 +160,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:communityInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:communityInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -221,19 +180,8 @@
|
||||
@pagination="liststationinfo"
|
||||
/>
|
||||
<!-- 添加居住社区信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
width="1060px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-dialog :title="title" :visible.sync="open2" width="1060px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
||||
<div
|
||||
v-for="(item, index) in form.communityInfoList"
|
||||
:key="index"
|
||||
@ -251,54 +199,35 @@
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="province2(item, index)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="item.city"
|
||||
clearable
|
||||
placeholder="请选择市"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="item.city" clearable placeholder="请选择市" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in citylist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickcity2(item, index)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="item.area"
|
||||
clearable
|
||||
placeholder="请选择区"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="item.area" clearable placeholder="请选择区" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in arealists"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickarea2(item, index)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="item.code"
|
||||
clearable
|
||||
placeholder="请选择街道"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="item.code" clearable placeholder="请选择街道" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in streetlist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickcode(item, index)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -306,11 +235,7 @@
|
||||
:rules="rules.communityInfoList.communityName"
|
||||
:prop="`communityInfoList.${index}.communityName`"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.communityName"
|
||||
placeholder="请输入社区名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
<el-input v-model="item.communityName" placeholder="请输入社区名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="社区经度"
|
||||
@ -322,7 +247,7 @@
|
||||
placeholder="请输入社区经度"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -334,8 +259,8 @@
|
||||
v-model="item.communityLatitude"
|
||||
placeholder="请输入社区纬度"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
type="number"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
@ -366,26 +291,15 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改居住社区信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1060px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-dialog :title="title" :visible.sync="open" width="1060px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
||||
<!-- <el-form-item label="所属区域" prop="areaCode">
|
||||
<el-input
|
||||
v-model="form.areaName"
|
||||
placeholder="请输入所属区域"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item label="所属区域" prop="areaCode">
|
||||
<el-select v-model="form.province" clearable placeholder="请选择省">
|
||||
<el-option
|
||||
@ -394,54 +308,35 @@
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="province3(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="form.city"
|
||||
clearable
|
||||
placeholder="请选择市"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="form.city" clearable placeholder="请选择市" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in citylist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickcity3(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.area"
|
||||
clearable
|
||||
placeholder="请选择区"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="form.area" clearable placeholder="请选择区" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in arealists"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickarea3(item)"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.code"
|
||||
clearable
|
||||
placeholder="请选择街道"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-select v-model="form.code" clearable placeholder="请选择街道" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in streetlist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native='clickcode2(item)'
|
||||
>
|
||||
</el-option>
|
||||
@click.native="clickcode2(item)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="社区名称" prop="communityName">
|
||||
@ -458,7 +353,7 @@
|
||||
placeholder="请输入社区经度"
|
||||
maxlength="20"
|
||||
style="width: 200px"
|
||||
type="number"
|
||||
type="number"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -468,7 +363,7 @@
|
||||
placeholder="请输入社区纬度"
|
||||
maxlength="20"
|
||||
style="width: 200px"
|
||||
type="number"
|
||||
type="number"
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -490,7 +385,7 @@ import {
|
||||
updateCommunityInfo,
|
||||
FirstLevels,
|
||||
SecondaryLevelInfo,
|
||||
SubordinateRegions,
|
||||
SubordinateRegions
|
||||
} from "@/api/system/communityInfo";
|
||||
|
||||
export default {
|
||||
@ -518,10 +413,10 @@ export default {
|
||||
{
|
||||
provinceName: null,
|
||||
cityName: null,
|
||||
streetName: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
streetName: null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
// 所属区域
|
||||
arealist: [],
|
||||
@ -547,7 +442,7 @@ export default {
|
||||
city: "",
|
||||
area: "",
|
||||
areaCode: "",
|
||||
province: "",
|
||||
province: ""
|
||||
// areaCode: null,
|
||||
// communityCode: null,
|
||||
// communityName: null,
|
||||
@ -557,7 +452,7 @@ export default {
|
||||
getProvincequeryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
pageNum: 1
|
||||
// pageSize: 10,
|
||||
// searchValue: null,
|
||||
// createBy: null,
|
||||
@ -573,7 +468,7 @@ export default {
|
||||
getProvincequeryParams2: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
pageNum: 1
|
||||
// pageSize: 10,
|
||||
// searchValue: null,
|
||||
// createBy: null,
|
||||
@ -593,12 +488,12 @@ export default {
|
||||
areaCode: {
|
||||
required: true,
|
||||
message: "所属区域不能为空",
|
||||
trigger: "blur",
|
||||
trigger: "blur"
|
||||
},
|
||||
communityName: {
|
||||
required: true,
|
||||
message: "社区名称不能为空",
|
||||
trigger: "blur",
|
||||
trigger: "blur"
|
||||
},
|
||||
// communityLongitude: {
|
||||
// required: true,
|
||||
@ -614,13 +509,13 @@ export default {
|
||||
areaCode: {
|
||||
required: true,
|
||||
message: "所属区域不能为空",
|
||||
trigger: "blur",
|
||||
trigger: "blur"
|
||||
},
|
||||
communityName: {
|
||||
required: true,
|
||||
message: "社区名称不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
// communityLongitude: {
|
||||
// required: true,
|
||||
// message: "经度不能为空",
|
||||
@ -631,8 +526,8 @@ export default {
|
||||
// message: "纬度不能为空",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -640,30 +535,22 @@ export default {
|
||||
this.Provincelist();
|
||||
},
|
||||
methods: {
|
||||
clickcode2(item) {
|
||||
clickcode2(item) {
|
||||
this.form.areaCode = Number(item.areaCode);
|
||||
console.log(this.form);
|
||||
this.$forceUpdate()
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
clickcode(item, index) {
|
||||
console.log(item);
|
||||
this.form.communityInfoList[index].areaCode = Number(item.areaCode);
|
||||
// this.form.communityInfoList[index].areaCode = Number(this.form.communityInfoList[index].areaCode);
|
||||
|
||||
console.log(this.form);
|
||||
},
|
||||
// 查询省事件
|
||||
province(item) {
|
||||
// this.form.xxx[index].code=''
|
||||
console.log(item);
|
||||
this.queryParams.city = "";
|
||||
this.queryParams.area = "";
|
||||
this.queryParams.areaCode = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
// this.SecondaryLevelInfolist = res.data;
|
||||
// console.log(this.SecondaryLevelInfolist);
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
@ -672,35 +559,27 @@ export default {
|
||||
this.form.communityInfoList[index].city = "";
|
||||
this.form.communityInfoList[index].area = "";
|
||||
this.form.communityInfoList[index].areaCode = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
// this.SecondaryLevelInfolist = res.data;
|
||||
// console.log(this.SecondaryLevelInfolist);
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
// 修改
|
||||
province3(item) {
|
||||
// this.form.xxx[index].code=''
|
||||
console.log(item);
|
||||
this.form.city = "";
|
||||
this.form.area = "";
|
||||
this.form.code = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
// this.SecondaryLevelInfolist = res.data;
|
||||
// console.log(this.SecondaryLevelInfolist);
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
// 点击市
|
||||
clickcity(item) {
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.queryParams.area = "";
|
||||
this.queryParams.areaCode = "";
|
||||
console.log(res);
|
||||
this.arealists = res.data;
|
||||
});
|
||||
},
|
||||
@ -712,19 +591,15 @@ export default {
|
||||
// this.value3 = "";
|
||||
this.form.communityInfoList[index].area = "";
|
||||
this.form.communityInfoList[index].areaCode = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.arealists = res.data;
|
||||
});
|
||||
},
|
||||
// 修改
|
||||
clickcity3(item) {
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.form.area = "";
|
||||
this.form.code = "";
|
||||
console.log(res);
|
||||
this.form.code = "";
|
||||
this.arealists = res.data;
|
||||
});
|
||||
},
|
||||
@ -733,9 +608,7 @@ export default {
|
||||
this.queryParams.areaCode = "";
|
||||
// this.queryParams.areaCode = "";
|
||||
// this.value3 = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
@ -745,64 +618,51 @@ export default {
|
||||
// this.value3 = "";
|
||||
|
||||
this.form.communityInfoList[index].areaCode = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
clickarea3(item) {
|
||||
this.form.code = "";
|
||||
this.form.code = "";
|
||||
// this.queryParams.areaCode = "";
|
||||
// this.value3 = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
SecondaryLevelInfo(item.id).then(res => {
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
console.log(this.form);
|
||||
},
|
||||
// clickstreet3(item) {
|
||||
// this.form.areaCode = item.areaCode;
|
||||
// // console.log(this.queryParams);
|
||||
// },
|
||||
// 所属省下拉框
|
||||
loadMore() {
|
||||
console.log("1");
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
console.log(this.arealist.length);
|
||||
if (this.arealist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getProvincequeryParams.pageNum >= a) {
|
||||
} else {
|
||||
this.getProvincequeryParams.pageNum++;
|
||||
FirstLevels(this.getProvincequeryParams).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
FirstLevels(this.getProvincequeryParams).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
this.arealist.push(e);
|
||||
console.log(this.arealist);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
Provincelist() {
|
||||
FirstLevels(this.getProvincequeryParams).then((res) => {
|
||||
console.log(res);
|
||||
FirstLevels(this.getProvincequeryParams).then(res => {
|
||||
this.arealist = res.data;
|
||||
this.total2 = res.total;
|
||||
console.log(this.arealist);
|
||||
});
|
||||
},
|
||||
//删除delcommunity
|
||||
delcommunity(index) {
|
||||
this.form.communityInfoList.splice(index, 1);
|
||||
console.log(this.form.communityInfoList);
|
||||
},
|
||||
//添加addcommunity
|
||||
addcommunity() {
|
||||
@ -811,7 +671,7 @@ export default {
|
||||
communityCode: "",
|
||||
communityName: "",
|
||||
communityLongitude: "",
|
||||
communityLatitude: "",
|
||||
communityLatitude: ""
|
||||
// diseaseName: "",
|
||||
// description: "",
|
||||
// sort: "",
|
||||
@ -852,16 +712,16 @@ export default {
|
||||
communityCode: "",
|
||||
communityName: "",
|
||||
communityLongitude: "",
|
||||
communityLatitude: "",
|
||||
},
|
||||
],
|
||||
communityLatitude: ""
|
||||
}
|
||||
]
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
listCommunityInfo(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
listCommunityInfo(this.queryParams).then(response => {
|
||||
response.rows.forEach(e => {
|
||||
if (e.sysAreaVOList == []) {
|
||||
} else if (e.sysAreaVOList == null) {
|
||||
} else if (!e.sysAreaVOList) {
|
||||
@ -924,13 +784,13 @@ export default {
|
||||
area: null,
|
||||
areaCode: null,
|
||||
areaName: null,
|
||||
areaLevel: null,
|
||||
areaLevel: null
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -944,16 +804,13 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
console.log(row);
|
||||
const id = row.id || this.ids;
|
||||
getCommunityInfo(id).then((response) => {
|
||||
getCommunityInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
|
||||
this.title = "修改居住社区信息";
|
||||
this.form.code = null;
|
||||
console.log(1);
|
||||
SubordinateRegions(response.data.areaCode).then((res) => {
|
||||
console.log(res);
|
||||
SubordinateRegions(response.data.areaCode).then(res => {
|
||||
if (res.data !== null) {
|
||||
this.form.province = String(res.data.provinceCode);
|
||||
// this.form.province = res.data.provinceCode;
|
||||
@ -961,7 +818,6 @@ export default {
|
||||
this.form.area = res.data.regionName;
|
||||
// this.form.areaCode = res.data.streetName;
|
||||
this.form.code = res.data.streetName;
|
||||
console.log(this.form);
|
||||
this.open = true;
|
||||
}
|
||||
});
|
||||
@ -969,21 +825,21 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// let newStr = JSON.stringify(this.form.areaCode);
|
||||
// let newObj = JSON.parse(newStr);
|
||||
|
||||
if (this.form.id != null) {
|
||||
updateCommunityInfo(this.form).then((response) => {
|
||||
updateCommunityInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open2 = false;
|
||||
this.open2 = false;
|
||||
this.open = false;
|
||||
|
||||
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCommunityInfo(this.form).then((response) => {
|
||||
addCommunityInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
@ -998,7 +854,7 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除居住社区信息的数据项?")
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
return delCommunityInfo(ids);
|
||||
})
|
||||
.then(() => {
|
||||
@ -1012,11 +868,11 @@ export default {
|
||||
this.download(
|
||||
"system/communityInfo/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.queryParams
|
||||
},
|
||||
`communityInfo_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -321,7 +321,6 @@ export default {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.diseaseInfoList.splice(index, 1);
|
||||
console.log(this.form.diseaseInfoList);
|
||||
},
|
||||
//添加adddisease
|
||||
adddisease() {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
</div>-->
|
||||
<div class="head-container" style="height: 580px; overflow-y: auto">
|
||||
<el-tree
|
||||
:data="deptOptions"
|
||||
@ -55,18 +55,10 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -78,8 +70,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:goodsCategory:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -90,8 +81,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -102,8 +92,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -115,11 +104,8 @@
|
||||
v-hasPermi="['system:goodsCategory:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@ -134,11 +120,7 @@
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类编码"
|
||||
align="center"
|
||||
prop="goodsCategoryCode"
|
||||
/>
|
||||
<el-table-column label="商品分类编码" align="center" prop="goodsCategoryCode" />
|
||||
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
||||
<el-table-column
|
||||
label="分类概述"
|
||||
@ -147,11 +129,7 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -159,16 +137,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -192,12 +168,7 @@
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item
|
||||
label="父级分类名称"
|
||||
prop="parentName"
|
||||
:required="true"
|
||||
v-if="form.parentId"
|
||||
>
|
||||
<el-form-item label="父级分类名称" prop="parentName" :required="true" v-if="form.parentId">
|
||||
<el-cascader
|
||||
:props="treeOption"
|
||||
@change="change"
|
||||
@ -206,21 +177,16 @@
|
||||
ref="cascader"
|
||||
:key="isResouceShow"
|
||||
:placeholder="form.parentName ? form.parentName : ''"
|
||||
>
|
||||
</el-cascader>
|
||||
></el-cascader>
|
||||
<!-- <el-input
|
||||
v-model="form.parentName"
|
||||
placeholder="请输入父级分类名称"
|
||||
maxlength="10"
|
||||
disabled
|
||||
/> -->
|
||||
/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="form.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
maxlength="10"
|
||||
/>
|
||||
<el-input v-model="form.goodsCategoryName" placeholder="请输入商品分类名称" maxlength="10" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||
<el-input
|
||||
@ -228,7 +194,7 @@
|
||||
placeholder="请输入商品分类编码"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item label="商品分类图片" prop="goodsCategoryPicture">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@ -238,11 +204,7 @@
|
||||
<!-- <img :src="form.goodsCategoryPicture" alt="" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="分类概述" prop="categoryRemark">
|
||||
<el-input
|
||||
v-model="form.categoryRemark"
|
||||
placeholder="请输入分类概述"
|
||||
maxlength="300"
|
||||
/>
|
||||
<el-input v-model="form.categoryRemark" placeholder="请输入分类概述" maxlength="300" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
@ -269,7 +231,7 @@ import {
|
||||
updatePicture,
|
||||
addGoodsCategory,
|
||||
updateGoodsCategory,
|
||||
getStationCategoryList,
|
||||
getStationCategoryList
|
||||
} from "@/api/system/goodsCategory";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl";
|
||||
@ -286,22 +248,22 @@ export default {
|
||||
lazyLoad(node, resolve) {
|
||||
const id = node.level === 0 ? 0 : node.data.id;
|
||||
setTimeout(() => {
|
||||
getStationCategoryList(id).then((res) => {
|
||||
getStationCategoryList(id).then(res => {
|
||||
// 接口请求
|
||||
res.data.forEach((e) => {
|
||||
res.data.forEach(e => {
|
||||
e.value = e.id;
|
||||
e.label = e.goodsCategoryName;
|
||||
});
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
...item
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
}, 300);
|
||||
},
|
||||
}
|
||||
},
|
||||
imgone: "",
|
||||
baseurl: "",
|
||||
@ -333,35 +295,33 @@ export default {
|
||||
categoryRemark: null,
|
||||
sort: null,
|
||||
parentId: 0,
|
||||
parentName: "",
|
||||
parentName: ""
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsCategoryName: [
|
||||
{ required: true, message: "商品分类名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类名称不能为空", trigger: "blur" }
|
||||
],
|
||||
goodsCategoryCode: [
|
||||
{ required: true, message: "商品分类编码不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类编码不能为空", trigger: "blur" }
|
||||
],
|
||||
goodsCategoryPicture: [
|
||||
{ required: true, message: "商品分类图片不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类图片不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryRemark: [
|
||||
{ required: true, message: "分类概述不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
|
||||
{ required: true, message: "分类概述不能为空", trigger: "blur" }
|
||||
],
|
||||
sort: [{ required: true, message: "显示顺序不能为空", trigger: "blur" }]
|
||||
},
|
||||
// 树选项
|
||||
deptOptions: undefined,
|
||||
categoryLevel: null,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "goodsCategoryName",
|
||||
},
|
||||
label: "goodsCategoryName"
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
@ -383,12 +343,12 @@ export default {
|
||||
this.queryParams.parentName = data.goodsCategoryName;
|
||||
// this.categoryLevel = data.categoryLevel;
|
||||
this.handleQuery();
|
||||
getStationCategoryList(data.id).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
getStationCategoryList(data.id).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.children = [
|
||||
{
|
||||
goodsCategoryName: "",
|
||||
},
|
||||
goodsCategoryName: ""
|
||||
}
|
||||
];
|
||||
});
|
||||
this.loading = false;
|
||||
@ -398,20 +358,20 @@ export default {
|
||||
/** 查询商品分类信息列表 */
|
||||
info() {
|
||||
this.loading = true;
|
||||
getStationCategoryList(0).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
getStationCategoryList(0).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.children = [
|
||||
{
|
||||
goodsCategoryName: "",
|
||||
},
|
||||
goodsCategoryName: ""
|
||||
}
|
||||
];
|
||||
});
|
||||
var obj = [
|
||||
{
|
||||
goodsCategoryName: "商品分类名称",
|
||||
children: res.data,
|
||||
id: 0,
|
||||
},
|
||||
id: 0
|
||||
}
|
||||
];
|
||||
this.deptOptions = obj;
|
||||
this.loading = false;
|
||||
@ -419,7 +379,7 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsCategory(this.queryParams).then((response) => {
|
||||
listGoodsCategory(this.queryParams).then(response => {
|
||||
this.goodsCategoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -433,7 +393,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
@ -452,7 +412,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
parentId: null,
|
||||
parentName: null,
|
||||
parentName: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -466,14 +426,14 @@ export default {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
parentId: 0,
|
||||
parentId: 0
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -482,7 +442,6 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加商品分类信息";
|
||||
console.log(this.queryParams);
|
||||
// if (this.queryParams.parentId != 0) {
|
||||
this.form.parentId = this.queryParams.parentId;
|
||||
// }
|
||||
@ -493,26 +452,25 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getGoodsCategory(id).then((response) => {
|
||||
getGoodsCategory(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.goodsCategoryPicture;
|
||||
this.open = true;
|
||||
this.title = "修改商品分类信息";
|
||||
console.log(this.form);
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsCategory(this.form).then((response) => {
|
||||
updateGoodsCategory(this.form).then(response => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.goodsCategoryPicture) {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow;
|
||||
@ -521,7 +479,7 @@ export default {
|
||||
this.info();
|
||||
});
|
||||
} else {
|
||||
addGoodsCategory(this.form).then((response) => {
|
||||
addGoodsCategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
++this.isResouceShow;
|
||||
this.open = false;
|
||||
@ -534,20 +492,17 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
return delGoodsCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
@ -559,15 +514,15 @@ export default {
|
||||
this.download(
|
||||
"system/goodsCategory/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.queryParams
|
||||
},
|
||||
`goodsCategory_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.goodsCategoryPicture = imgUrl;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -210,7 +210,6 @@ export default {
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg() {
|
||||
// console.log(this.types);
|
||||
this.$refs.cropper.getCropBlob((data) => {
|
||||
let formData = new FormData();
|
||||
formData.append("file", data);
|
||||
|
||||
@ -73,8 +73,7 @@ export default {
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
integraloption: [
|
||||
{
|
||||
integraloption: [{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
@ -83,7 +82,7 @@ export default {
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
value:"",
|
||||
value: "",
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
ids: [],
|
||||
@ -183,7 +182,6 @@ export default {
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
upwhetherShelf(row) {
|
||||
console.log(row);
|
||||
if (row.whetherShelf == false) {
|
||||
var obj = {
|
||||
id: row.goodsInfoId,
|
||||
@ -196,7 +194,6 @@ export default {
|
||||
};
|
||||
}
|
||||
editGoodsWhetherShelf(obj).then((res) => {
|
||||
console.log(obj);
|
||||
if (obj.whetherShelf == 0) {
|
||||
this.$modal.msgSuccess("已修改上架状态为未上架");
|
||||
} else {
|
||||
@ -217,14 +214,12 @@ export default {
|
||||
}
|
||||
});
|
||||
this.goodsInfoList = response.rows;
|
||||
console.log(this.goodsInfoList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
addgoodAttributeDetail() {
|
||||
console.log(this.goodDetailsLists);
|
||||
if (this.goodDetailsLists.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
@ -234,9 +229,9 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
integralExchangeCount:null,
|
||||
integralExchangeFlag:null,
|
||||
integralExchangeSill:null,
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
@ -270,9 +265,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
@ -337,9 +330,9 @@ export default {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
integralExchangeCount:null,
|
||||
integralExchangeFlag:null,
|
||||
integralExchangeSill:null,
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
sort: null,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
@ -367,7 +360,6 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.goodsInfoId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
@ -383,9 +375,9 @@ export default {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
integralExchangeCount:null,
|
||||
integralExchangeFlag:null,
|
||||
integralExchangeSill:null,
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
sort: null,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
@ -396,7 +388,6 @@ export default {
|
||||
// this.reset();
|
||||
const id = row.goodsInfoId || this.ids;
|
||||
getGoodsInfo(id).then((response) => {
|
||||
console.log(response);
|
||||
this.form = response.data;
|
||||
this.form.nurseStationName = row.nurseStationName;
|
||||
this.imgone = this.form.goodsPictureUrl;
|
||||
@ -409,21 +400,18 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
console.log(this.goodDetailsLists);
|
||||
this.form.goodAttributeDetailsLists = [];
|
||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||
if (!this.form.goodDetailsLists.integralExchangeFlag) {
|
||||
this.form.goodDetailsLists.integralExchangeFlag = null
|
||||
}
|
||||
if (this.form.goodDetailsLists.integralExchangeSill=="") {
|
||||
if (this.form.goodDetailsLists.integralExchangeSill == "") {
|
||||
this.form.goodDetailsLists.integralExchangeSill = null
|
||||
|
||||
}
|
||||
}
|
||||
if (this.form.goodDetailsLists.integralExchangeCount == "") {
|
||||
this.form.goodDetailsLists.integralExchangeCount = null
|
||||
}
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.goodsInfoId != null) {
|
||||
@ -437,9 +425,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
++this.isResouceShow;
|
||||
@ -464,7 +450,6 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log("row :>> ", row);
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
@ -473,14 +458,11 @@ export default {
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
@ -509,11 +491,9 @@ export default {
|
||||
// );
|
||||
// },
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
},
|
||||
attributePitureUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
// this.form.attributePitureUrl = imgUrl;
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
@ -535,12 +515,9 @@ export default {
|
||||
//权限列表
|
||||
info() {
|
||||
goodsCategory().then((res) => {
|
||||
console.log(res);
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
console.log(res);
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
@ -558,7 +535,6 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res)
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
@ -708,14 +708,12 @@ export default {
|
||||
},
|
||||
// 查看录入物流单号弹框
|
||||
seelogistics(row) {
|
||||
// console.log(id);
|
||||
// this.queryexpressNo.id = row.id;
|
||||
this.queryexpressNo = JSON.parse(JSON.stringify(row));
|
||||
this.innerlogistics = true;
|
||||
},
|
||||
// 确定按钮
|
||||
searchlogistics() {
|
||||
console.log(this.queryexpressNo);
|
||||
editExpressNo(this.queryexpressNo).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess("录入成功");
|
||||
@ -732,10 +730,8 @@ export default {
|
||||
},
|
||||
// 确认退款
|
||||
refund(id) {
|
||||
console.log(id);
|
||||
goodsOrderRefundinfo(id).then(res => {
|
||||
this.refundlist = res.data;
|
||||
console.log(this.refundlist);
|
||||
this.innerrefund = true;
|
||||
// this.getList();
|
||||
});
|
||||
@ -758,7 +754,6 @@ export default {
|
||||
});
|
||||
},
|
||||
// refund(id){
|
||||
// console.log(id);
|
||||
// this.$confirm('是否确认退款?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
@ -937,7 +932,6 @@ export default {
|
||||
pageSize: 9999
|
||||
};
|
||||
getListByUser(queryFor).then(res => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
}
|
||||
|
||||
@ -284,7 +284,6 @@ export default {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseTypeList.splice(index, 1);
|
||||
console.log(this.form.nurseTypeList);
|
||||
},
|
||||
adddisease() {
|
||||
var obj = {
|
||||
|
||||
@ -539,7 +539,6 @@ export default {
|
||||
}
|
||||
this.getList();
|
||||
this.innerrefund = false;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
@ -629,7 +628,6 @@ export default {
|
||||
getPerson(this.querynursePersonname).then(res => {
|
||||
this.dispatchlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
console.log(this.dispatchlist);
|
||||
this.nursePersonNameinfo = true;
|
||||
});
|
||||
},
|
||||
@ -653,7 +651,6 @@ export default {
|
||||
this.nursePersonid = row.nurseStationPersonId;
|
||||
this.nurseName = row.nursePersonName;
|
||||
this.nursePersonNameinfo = false;
|
||||
console.log(row);
|
||||
},
|
||||
// 确认取消预约
|
||||
cencel(row) {
|
||||
@ -694,7 +691,6 @@ export default {
|
||||
handleQuery2() {
|
||||
getPerson(this.querynursePersonname).then(res => {
|
||||
this.dispatchlist = res.rows;
|
||||
console.log(this.querynursePersonname);
|
||||
// this.innerdispatch = true;
|
||||
});
|
||||
},
|
||||
@ -733,7 +729,6 @@ export default {
|
||||
pageSize: 9999
|
||||
};
|
||||
getListByUser(queryFor).then(res => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
@ -749,7 +744,6 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// console.log('row :>> ', row);
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
|
||||
@ -602,9 +602,7 @@ export default {
|
||||
methods: {
|
||||
// 重置密码
|
||||
handleResetPwd(row) {
|
||||
console.log(row)
|
||||
const id= row.id
|
||||
console.log(id)
|
||||
// const id=row.userId
|
||||
this.$prompt('请输入新的密码', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@ -614,7 +612,6 @@ export default {
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
const params = {
|
||||
id,
|
||||
password: res.value
|
||||
@ -627,7 +624,6 @@ export default {
|
||||
},
|
||||
// 查询省事件
|
||||
province(item) {
|
||||
console.log(item);
|
||||
this.queryParams.city = "";
|
||||
this.queryParams.area = "";
|
||||
this.queryParams.areaCode = "";
|
||||
@ -635,9 +631,7 @@ export default {
|
||||
// this.value2 = "";
|
||||
// this.value3 = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.SecondaryLevelInfolist = res.data;
|
||||
// console.log(this.SecondaryLevelInfolist);
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
@ -647,41 +641,32 @@ export default {
|
||||
this.queryParams.areaCode = "";
|
||||
// this.value2 = "";
|
||||
// this.value3 = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.arealists = res.data;
|
||||
});
|
||||
},
|
||||
//点击区县城
|
||||
clickarea(item) {
|
||||
// this.value3 = "";
|
||||
console.log(item);
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
console.log(this.form);
|
||||
},
|
||||
// 所属省下拉框
|
||||
loadMore() {
|
||||
console.log("1");
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
console.log(this.arealist.length);
|
||||
if (this.arealist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getProvincequeryParams.pageNum >= a) {
|
||||
} else {
|
||||
this.getProvincequeryParams.pageNum++;
|
||||
FirstLevel(this.getProvincequeryParams).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
this.arealist.push(e);
|
||||
console.log(this.arealist);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -689,10 +674,8 @@ export default {
|
||||
},
|
||||
Provincelist() {
|
||||
FirstLevel(this.getProvincequeryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.arealist = res.data;
|
||||
this.total2 = res.total;
|
||||
console.log(this.arealist);
|
||||
});
|
||||
},
|
||||
/** 查询被护理人基本信息列表 */
|
||||
|
||||
@ -265,7 +265,6 @@ export default {
|
||||
//接收图片所属的item
|
||||
imgclassifyItem(item) {
|
||||
let items = JSON.parse(item);
|
||||
console.log(items)
|
||||
if (items.idd && !items.id) {
|
||||
this.form.nurseStationPersonCertificateList.forEach((e) => {
|
||||
if (e.idd == items.idd) {
|
||||
@ -284,7 +283,6 @@ export default {
|
||||
departclick(item, index) {
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
console.log(item);
|
||||
this.departid = item.departmentCode;
|
||||
this.innerVisible2 = true;
|
||||
this.index = index;
|
||||
@ -295,7 +293,6 @@ export default {
|
||||
},
|
||||
// // 修改所属科室按钮
|
||||
departclick2() {
|
||||
console.log(this.form.nurseStationId);
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
this.departid2 = this.form.departmentCode;
|
||||
@ -321,7 +318,6 @@ export default {
|
||||
},
|
||||
// 修改护理站
|
||||
nurseclick2(row) {
|
||||
console.log(row);
|
||||
this.nurseStationName = row.nurseStationName;
|
||||
this.stationid2 = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
@ -343,10 +339,8 @@ export default {
|
||||
},
|
||||
// 所属科室
|
||||
StationDepartmentclick(row) {
|
||||
console.log(row);
|
||||
this.departname = row.departmentName;
|
||||
this.departid = row.departmentCode;
|
||||
console.log(this.departid);
|
||||
this.departmentCode = row.departmentCode;
|
||||
// this.form.nurseStationId = row.id;
|
||||
this.innerVisible2 = false;
|
||||
@ -355,11 +349,9 @@ export default {
|
||||
row.departmentName;
|
||||
this.form.nurseStationPersonList[this.index].departmentCode =
|
||||
row.departmentCode;
|
||||
console.log(this.form);
|
||||
},
|
||||
// 修改科室
|
||||
StationDepartmentclick2(row) {
|
||||
console.log(row);
|
||||
this.departmentName = row.departmentName;
|
||||
this.form.departmentCode = row.departmentCode;
|
||||
this.departid2 = row.departmentCode;
|
||||
@ -503,7 +495,6 @@ export default {
|
||||
handleUpdate(row) {
|
||||
const id = row.id || this.ids;
|
||||
getPerson(id).then((response) => {
|
||||
console.log(response);
|
||||
this.departmentName = response.data.departmentName;
|
||||
this.nurseStationName = response.data.nurseStationName;
|
||||
this.form = response.data;
|
||||
|
||||
@ -804,8 +804,6 @@ export default {
|
||||
this.form.stationIntroducePcitureUrl = imgUrl;
|
||||
},
|
||||
delnurseStationLabelList(index, item) {
|
||||
console.log(index, item);
|
||||
console.log();
|
||||
// this.looknurseStationLabel.splice(index,1)
|
||||
if (this.looknurseStationLabel.length === 1) {
|
||||
this.looknurseStationLabel = [{
|
||||
@ -833,7 +831,6 @@ export default {
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
console.log(item, this.form);
|
||||
},
|
||||
//点击区县城
|
||||
clickarea(item) {
|
||||
@ -1056,7 +1053,6 @@ export default {
|
||||
this.looknurseStationLabel = response.data.nurseStationLabel;
|
||||
this.open = true;
|
||||
this.loading = false;
|
||||
console.log(this.form);
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
||||
@ -168,7 +168,6 @@ export default {
|
||||
} else {
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
}
|
||||
console.log(this.video);
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
@ -294,7 +293,6 @@ export default {
|
||||
if (this.types == "certificateUrl") {
|
||||
this.items.certificateUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
console.log(this.item);
|
||||
}
|
||||
if (this.types == "personCertificateUrl") {
|
||||
this.items.certificateUrl = response.imgUrl;
|
||||
|
||||
@ -496,7 +496,6 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
|
||||
@ -1161,7 +1161,6 @@ export default {
|
||||
e.consumableCount = Number(e.consumableCount);
|
||||
});
|
||||
}
|
||||
console.log(this.form)
|
||||
if (this.form.nurseStationItemPrices.length > 0) {
|
||||
this.form.nurseStationItemPrices.forEach(e => {
|
||||
if (!e.commissionAmount || e.commissionAmount == "") {
|
||||
|
||||
@ -661,21 +661,18 @@ export default {
|
||||
methods: {
|
||||
listinfo() {
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
});
|
||||
},
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
console.log(this.nurseStationlist.length);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.nurseStationqueryParams.pageNum >= a) {
|
||||
} else {
|
||||
this.nurseStationqueryParams.pageNum++;
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
@ -814,8 +811,6 @@ export default {
|
||||
// return (e = Number(e));
|
||||
// });
|
||||
// }
|
||||
|
||||
console.log(this.form);
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.form.postIds = response.postIds;
|
||||
@ -855,7 +850,6 @@ export default {
|
||||
// this.form.nurseStationIds = JSON.stringify(this.form.nurseStationIds);
|
||||
// var obj = [];
|
||||
// obj.push(this.form.nurseStationIds);
|
||||
// console.log(obj)
|
||||
// this.form.nurseStationIds = obj;
|
||||
|
||||
if (this.form.userId != undefined) {
|
||||
@ -865,7 +859,6 @@ export default {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
// console.log('bbb',this.form)
|
||||
});
|
||||
} else {
|
||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
@ -873,7 +866,6 @@ export default {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
// console.log('bbb',this.form)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -12,15 +12,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
getListByUser().then((res) => {
|
||||
console.log(res);
|
||||
getListByUser().then(res => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
console.log(true);
|
||||
} else {
|
||||
this.$emit("itemlist", res.rows);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user