Commit b850620d by hank

添加邮箱

parent c3126569
......@@ -2,7 +2,8 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://172.16.4.63:8090'
#VUE_APP_BASE_API = 'http://172.16.4.63:8090'
VUE_APP_BASE_API = 'http://123.56.149.208:8090'
VUE_APP_BASE_API_MOCK = '/dev-api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
......
......@@ -32,14 +32,14 @@ export default {
return rect.width - 1 < WIDTH
},
$_resizeHandler() {
if (!document.hidden) {
const isMobile = this.$_isMobile()
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
// if (!document.hidden) {
// const isMobile = this.$_isMobile()
// store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
if (isMobile) {
store.dispatch('app/closeSideBar', { withoutAnimation: true })
}
}
// if (isMobile) {
// store.dispatch('app/closeSideBar', { withoutAnimation: true })
// }
// }
}
}
}
......@@ -3,12 +3,12 @@
<div>
<div>
<div>省份:</div>
<br />
<br>
<el-select v-model="temp.code" placeholder="请选择">
<el-option v-for="item in citys" :key="item.name" :label="item.name" :value="item.code" />
</el-select>
</div>
<br />
<br>
<el-checkbox
v-model="checkAll"
:indeterminate="isIndeterminate"
......@@ -20,8 +20,8 @@
<el-checkbox v-for="city in cities" :key="city" :label="city">{{ city }}</el-checkbox>
</el-checkbox-group>
</div>
<br />
<br />
<br>
<br>
<div>
<el-checkbox
v-model="checkAll2"
......@@ -42,95 +42,95 @@
</template>
<script>
import { getProvince, getVisit, updateVisit } from "@/api/common";
import { getProvince, getVisit, updateVisit } from '@/api/common'
const cityOptions = ["上海", "北京", "广州", "深圳"];
const cityOptions = ['上海', '北京', '广州', '深圳']
const defaultCity = [
{
name: "京津冀",
code: "1"
name: '京津冀',
code: '1'
},
{
name: "长三角",
code: "2"
name: '长三角',
code: '2'
},
{
name: "珠三角",
code: "3"
name: '珠三角',
code: '3'
},
{
name: "长江流域",
code: "4"
name: '长江流域',
code: '4'
}
];
]
export default {
name: "Modules",
name: 'Modules',
data() {
return {
checkAll: false,
citys: [],
checkedCities: ["上海", "北京"],
checkedCities: ['上海', '北京'],
cities: cityOptions,
isIndeterminate: true,
checkAll2: false,
checkedCities2: ["上海", "北京"],
checkedCities2: ['上海', '北京'],
cities2: cityOptions,
isIndeterminate2: true,
temp: {
code: "1"
code: '1'
}
}
};
},
created() {
this.getMyProvince();
this.getMyVisit();
this.getMyProvince()
this.getMyVisit()
},
methods: {
submit() {
updateVisit({
code: "",
code: '',
industry: [],
position: []
}).then(() => {
this.$notify({
title: "Success",
message: "更新成功",
type: "success",
title: 'Success',
message: '更新成功',
type: 'success',
duration: 2000
});
});
})
})
},
async getMyProvince() {
const data = await getProvince();
this.citys = [...defaultCity, ...data.data];
console.log(data);
const data = await getProvince()
this.citys = [...defaultCity, ...data.data]
console.log(data)
},
async getMyVisit() {
const data = await getVisit();
console.log(data);
const data = await getVisit()
console.log(data)
},
handleCheckAllChange(val) {
this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
this.checkedCities = val ? cityOptions : []
this.isIndeterminate = false
},
handleCheckedCitiesChange(value) {
const checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
const checkedCount = value.length
this.checkAll = checkedCount === this.cities.length
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
checkedCount > 0 && checkedCount < this.cities.length
},
handleCheckAllChange2(val) {
this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
this.checkedCities = val ? cityOptions : []
this.isIndeterminate = false
},
handleCheckedCitiesChange2(value) {
const checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
const checkedCount = value.length
this.checkAll = checkedCount === this.cities.length
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
checkedCount > 0 && checkedCount < this.cities.length
}
}
};
}
</script>
<style lang="scss" scoped>
......
......@@ -181,6 +181,13 @@
placeholder="请输入"
/>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input
v-model="temp.email"
type="text"
placeholder="请输入"
/>
</el-form-item>
<el-form-item label="邮编" prop="postal">
<el-input
v-model="temp.postal"
......@@ -188,6 +195,28 @@
placeholder="请输入"
/>
</el-form-item>
<el-form-item label="上传图片" prop="type">
<el-upload
class="upload-demo"
drag
name="resource"
accept="image/*"
:limt="1"
:file-list="fileList"
list-type="picture"
:show-file-list="true"
:on-success="uploadZipSuccess"
:on-progress="onProgress"
:action="uploadUrl"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处,或
<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip">只能上传图片</div>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
......@@ -245,6 +274,7 @@ export default {
tableKey: 0,
list: null,
total: 0,
fileList: [],
listLoading: true,
listQuery: {
page: 1,
......@@ -445,6 +475,13 @@ export default {
handleUpdate(row) {
getDetail(row.liaisonId).then(res => {
this.temp = res.data
this.fileList = this.temp.url.split(',').map(item => {
return {
uid: '',
name: item,
url: item
}
})
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
......@@ -495,7 +532,7 @@ export default {
} else {
this.fullscreenLoading = false
this.$message('上传成功')
this.temp.url = e.url
this.temp.url = e.data
console.log(this.temp)
}
console.log(e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment