+
{{ fmData[item.keyName] || "--" }}
-
+ v-model="fmData[item.keyName]"
+ :picker-options="item.pickerOptions"
+ class="item-input"
+ size="small"
+ clearable
+ show-word-limit
+ :value-format="item.format || 'yyyy-MM-dd'"
+ :placeholder="item.placeholder || '请输入'"
+ >
-
+
{{ fmData[item.keyName] || "--" }}
-
+ v-model="fmData[item.keyName]"
+ class="item-number"
+ size="small"
+ clearable
+ :precision="item.precision || 0"
+ :step="item.step || 1"
+ :min="item.min || 0"
+ :max="item.max || 999999999999"
+ :placeholder="item.placeholder || '请输入'"
+ >
-
+
{{ fmData[item.keyName] || "--" }}
({{ item.unitName }})
- handleChangeSelect(e, item)">
+ handleChangeSelect(e, item)"
+ >
-
-
+
+
-
+
-
-
+ class="item-rich-text"
+ >
+
-
+
- handleChangeCascader(e, item)">
+ handleChangeCascader(e, item)"
+ >
-
+ ref="upload"
+ class="avatar-uploader"
+ :class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
+ :action="item.uploadUrl || uploadUrl"
+ :data="{ customerId: customerId }"
+ :show-file-list="true"
+ :list-type="item.listType || 'picture'"
+ :limit="item.limit || 100"
+ :file-list="fmData[item.keyName]"
+ :on-success="(res, file) => handleImgSuccess(res, file, item)"
+ :on-error="(res, file) => handleImgError(res, file, item)"
+ :on-remove="(res) => handleImgRemove(res, item)"
+ :on-exceed="(res) => handleImgExceed(res, item)"
+ :before-upload="(file) => beforeImgUpload(file, item)"
+ >
点击上传
-
+
--
@@ -239,16 +269,20 @@
经度
-
+
纬度
-
+
@@ -275,44 +309,52 @@
-
-
{{
+
+ {{
editConfig.cancelBtnName || "取消"
}}
- {{ editConfig.confirmBtnName || "确定" }}
-
+ {{ editConfig.confirmBtnName || "确定" }}
+
-
+
-
-
{{
+
+ {{
editConfig.cancelBtnName || "取消"
}}
- {{ editConfig.confirmBtnName || "确定" }}
-
+ {{ editConfig.confirmBtnName || "确定" }}
+
@@ -385,7 +427,7 @@ export default {
},
},
- data () {
+ data() {
return {
iniLoaded: false,
loading: false,
@@ -407,19 +449,19 @@ export default {
computed: {},
watch: {
editParams: {
- handler () {
+ handler() {
this.computeFmData();
},
deep: true,
},
},
- async mounted () {
+ async mounted() {
this.initForm();
},
methods: {
- async initForm () {
+ async initForm() {
this.iniFmData();
if (this.formId && this.formType != "add") {
@@ -427,11 +469,11 @@ export default {
}
},
- computeFmData () {
+ computeFmData() {
console.log(this.fmData);
},
- iniFmData () {
+ iniFmData() {
const { editParams, fmData, editParamsDiv } = this;
editParams.forEach((item, index) => {
if (typeof item.value == "function") {
@@ -503,7 +545,7 @@ export default {
this.iniLoaded = true;
},
- handleClickHtmlNode (e) {
+ handleClickHtmlNode(e) {
//在判断事件目标节点的时候,考虑到兼容性应该统一转换成大写或小写进行判断
if (e.target.localName.toLowerCase() === "a") {
// 通过判端目标节点以后,就能在这里对其进行操作啦。
@@ -512,7 +554,7 @@ export default {
}
},
- async getFmOptions (index, url, params, cookFn) {
+ async getFmOptions(index, url, params, cookFn) {
const { data, code, msg } = await requestPost(url, {
...params,
});
@@ -525,13 +567,13 @@ export default {
}
},
- handleChangeCascader (vals, item) {
+ handleChangeCascader(vals, item) {
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item, this);
}
},
- handleChangeSelect (vals, item) {
+ handleChangeSelect(vals, item) {
console.log(vals, item);
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
@@ -539,14 +581,14 @@ export default {
}
},
- beforeImgUpload (file, item) {
+ beforeImgUpload(file, item) {
if (typeof item.beforeImgUpload == "function") {
if (!item.beforeImgUpload(file, item, this)) return false;
}
return true;
},
- handleImgRemove (file, item) {
+ handleImgRemove(file, item) {
console.log("handleImgRemove", file);
let url = file.response ? file.response.data.url : file.url;
if (url) {
@@ -568,7 +610,7 @@ export default {
}
},
- handleImgExceed (res, item) {
+ handleImgExceed(res, item) {
console.log(res);
// this.$message({
// type: "warning",
@@ -576,7 +618,7 @@ export default {
// });
},
- handleImgSuccess (res, file, item) {
+ handleImgSuccess(res, file, item) {
console.log("handleImgSuccess", res);
if (res.code === 0 && res.msg === "success") {
let { fmData } = this;
@@ -612,12 +654,12 @@ export default {
}
},
- handleImgError (res, file, item) {
+ handleImgError(res, file, item) {
console.log(res);
},
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
- initMap (item) {
+ initMap(item) {
let { latitude, longitude } = this.$store.state.user;
map = new daiMap(
@@ -756,12 +798,12 @@ export default {
}
},
- watchImg (src) {
+ watchImg(src) {
window.open(src);
},
// 过滤文本
- dormatHtml (content) {
+ dormatHtml(content) {
if (
content.startsWith(
"\n\n\n\n\n"
@@ -773,7 +815,7 @@ export default {
return content;
},
- cookBeforeSubmit (data) {
+ cookBeforeSubmit(data) {
Object.keys(data).forEach((k) => {
if (typeof data[k] == "string") {
data[k] = this.dormatHtml(data[k]);
@@ -782,7 +824,7 @@ export default {
return data;
},
- async handleComfirm () {
+ async handleComfirm() {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
@@ -814,7 +856,7 @@ export default {
});
},
- async submit () {
+ async submit() {
const { editConfig, fmData, formType, editFixedParams } = this;
if (
typeof editConfig.beforeSubmit == "function" &&
@@ -854,7 +896,7 @@ export default {
}
},
- handleCancle () {
+ handleCancle() {
this.$emit("close");
},
},
@@ -927,13 +969,14 @@ export default {
.item {
min-width: 45%;
- .item-rich-text {
+ /deep/ .item-rich-text {
width: 817px;
max-height: 500px;
overflow: auto;
img {
max-width: 100%;
+ height: auto;
}
&.z-show {
box-sizing: border-box;
diff --git a/src/views/modules/visual/communityGovern/zhongdianxingcheng/zhongdianxingcheng.vue b/src/views/modules/visual/communityGovern/zhongdianxingcheng/zhongdianxingcheng.vue
index c3084c377..184dc1c5f 100644
--- a/src/views/modules/visual/communityGovern/zhongdianxingcheng/zhongdianxingcheng.vue
+++ b/src/views/modules/visual/communityGovern/zhongdianxingcheng/zhongdianxingcheng.vue
@@ -99,6 +99,7 @@ export default {
colorArray: [],
pieData: [],
+ name: '',
code: '',
dangerLevel: '',
@@ -192,11 +193,15 @@ export default {
},
async handleAreaChange (val) {
+
+ debugger
if (val.length > 0) {
// this.code = val.join('-')
- this.code = val[val.length - 1]
+ // this.code = val[val.length - 1]
+ this.name = this.$refs["sourceArea"].getCheckedNodes()[0].label
} else {
- this.code = ''
+ // this.code = ''
+ this.name = ''
}
await this.getPieChart()
@@ -268,7 +273,8 @@ export default {
const url = "/epmetuser/tripreport/emphasisTripPieDetail";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/tripreport/emphasisTripPieDetail";
let params = {
- code: this.code,
+
+ name: this.name,
};
@@ -418,7 +424,7 @@ export default {
const url = "/epmetuser/tripreport/list";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/tripreport/list";
let params = {
- code: this.code,
+ name: this.name,
dangerLevel: this.dangerLevel,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
@@ -491,6 +497,9 @@ export default {
this.getApiData();
window.scrollTo(0, 0);
},
+ // sourceAllCode (val) {
+ // // debugger
+ // }
},
};