提交 45be0541 编写于 作者: zhentian.jia's avatar zhentian.jia

解决element更新问题

上级 4ea76d2a
...@@ -2568,7 +2568,7 @@ ...@@ -2568,7 +2568,7 @@
}, },
"extract-text-webpack-plugin": { "extract-text-webpack-plugin": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-1.0.1.tgz", "resolved": "http://192.168.110.93:4873/extract-text-webpack-plugin/-/extract-text-webpack-plugin-1.0.1.tgz",
"integrity": "sha1-yVvzy6rEnclvHcbgclSfu2VMzSw=", "integrity": "sha1-yVvzy6rEnclvHcbgclSfu2VMzSw=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -9116,7 +9116,7 @@ ...@@ -9116,7 +9116,7 @@
}, },
"webpack-sources": { "webpack-sources": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.1.5.tgz", "resolved": "http://192.168.110.93:4873/webpack-sources/-/webpack-sources-0.1.5.tgz",
"integrity": "sha1-qh86vw8NdNtxEcQOUAuE+WZkB1A=", "integrity": "sha1-qh86vw8NdNtxEcQOUAuE+WZkB1A=",
"dev": true, "dev": true,
"requires": { "requires": {
......
...@@ -10,9 +10,9 @@ export const envConfig = { ...@@ -10,9 +10,9 @@ export const envConfig = {
// baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'http://10.177.15.150:10401/', // baseUrl: 'http://10.177.15.150:10401/',
// baseUrl: 'http://10.177.15.150:11905/', // baseUrl: 'http://10.177.15.150:11905/',
// baseUrl: 'https://dev-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
apiUrl: 'https://dev-api.yunqueyi.com/', apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
...@@ -27,9 +27,9 @@ export const envConfig = { ...@@ -27,9 +27,9 @@ export const envConfig = {
workApiSrc: 'https://dev-work.yunqueyi.com', workApiSrc: 'https://dev-work.yunqueyi.com',
// reportUrl: 'http://10.177.15.150:10401/', // reportUrl: 'http://10.177.15.150:10401/',
// reportUrl: 'http://192.168.140.13:10401/', // reportUrl: 'http://192.168.140.13:10401/',
// reportUrl: 'https://dev-sc-report.yunqueyi.com/', reportUrl: 'https://dev-sc-report.yunqueyi.com/',
// reportUrl: 'https://test1-sc-report.yunqueyi.com/', // reportUrl: 'https://test1-sc-report.yunqueyi.com/',
reportUrl: 'https://uat-sc-report.yunqueyi.com/', // reportUrl: 'https://uat-sc-report.yunqueyi.com/',
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
......
...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => { ...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
} }
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV); // console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '6F0F3B3F0EB24A14AA025FA47CD43770'; config.headers['token'] = 'D2E29BE9FF794703A482518A04D344E2';
}else{ }else{
config.headers['token'] = localStorage.getItem('storageToken') config.headers['token'] = localStorage.getItem('storageToken')
} }
......
...@@ -178,11 +178,11 @@ ...@@ -178,11 +178,11 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所在地区" prop="addressList"> <el-form-item label="所在地区" prop="addressList">
<!--@active-item-change="handleItemChange"-->
<el-cascader <el-cascader
placeholder="请选择省市县乡" placeholder="请选择省市县乡"
:options="provinceList" :options="provinceList"
v-model="addressList" v-model="addressList"
@active-item-change="handleItemChange"
:props="optionProps"> :props="optionProps">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -252,6 +252,7 @@ ...@@ -252,6 +252,7 @@
getCityList, getCityList,
getCountyList, getCountyList,
getTownList } from '@/utils/patients/patientsapi'; getTownList } from '@/utils/patients/patientsapi';
let vm = null;
export default { export default {
name: "basicInfo", name: "basicInfo",
components: {}, components: {},
...@@ -338,7 +339,55 @@ ...@@ -338,7 +339,55 @@
optionProps: { optionProps: {
value: "id", value: "id",
label: "name", label: "name",
children: "children" children: "children",
lazy: true,
lazyLoad(node, resolve) {
const { level } = node;
console.log("node", node);
if (node.level == 1) {
let req = {
provinceId: node.data.id
};
vm.GET("basic-data/position/cities", req).then(res => {
let newData = res.data.cityList;
newData.map(item => {
vm.$set(item, "id", item.cityId);
vm.$set(item, "name", item.cityName);
vm.$set(item, "children", []);
});
console.log("newData", newData);
resolve(newData);
});
} else if (node.level == 2) {
let req = {
cityId: node.data.id
};
vm.GET("basic-data/position/counties", req).then(res => {
let newData = res.data.countyList;
newData.map(item => {
vm.$set(item, "id", item.countyId);
vm.$set(item, "name", item.countyName);
vm.$set(item, "children", []);
});
console.log("newData", newData);
resolve(newData);
});
} else if (node.level == 3) {
let req = {
countyId: node.data.id
};
vm.GET("basic-data/position/towns", req).then(res => {
let newData = res.data.townList;
newData.map(item => {
vm.$set(item, "id", item.townId);
vm.$set(item, "name", item.townName);
vm.$set(item, "leaf", true);
});
console.log("newData", newData);
resolve(newData);
});
}
}
}, },
tipsText: '展开录入完整信息', tipsText: '展开录入完整信息',
isShowAll: false, isShowAll: false,
...@@ -430,6 +479,7 @@ ...@@ -430,6 +479,7 @@
}, },
}, },
created() { created() {
vm = this;
this.initConstant(); this.initConstant();
}, },
mounted(){ mounted(){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册