Commit b83dd441 by 杨明

fixed

1 parent bcbc2f1a
...@@ -1969,44 +1969,6 @@ ...@@ -1969,44 +1969,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"debug": { "debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
...@@ -2016,13 +1978,6 @@ ...@@ -2016,13 +1978,6 @@
"ms": "2.1.2" "ms": "2.1.2"
} }
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
...@@ -2037,28 +1992,6 @@ ...@@ -2037,28 +1992,6 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -2715,8 +2648,7 @@ ...@@ -2715,8 +2648,7 @@
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
"dev": true
}, },
"atob": { "atob": {
"version": "2.1.2", "version": "2.1.2",
...@@ -2776,12 +2708,30 @@ ...@@ -2776,12 +2708,30 @@
"dev": true "dev": true
}, },
"axios": { "axios": {
"version": "0.18.1", "version": "1.4.0",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.18.1.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
"requires": { "requires": {
"follow-redirects": "1.5.10", "follow-redirects": "^1.15.0",
"is-buffer": "^2.0.2" "form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
},
"dependencies": {
"follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
} }
}, },
"babel-eslint": { "babel-eslint": {
...@@ -3848,7 +3798,6 @@ ...@@ -3848,7 +3798,6 @@
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"requires": { "requires": {
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
} }
...@@ -4688,6 +4637,7 @@ ...@@ -4688,6 +4637,7 @@
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "2.0.0"
} }
...@@ -4945,8 +4895,7 @@ ...@@ -4945,8 +4895,7 @@
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
"dev": true
}, },
"delegates": { "delegates": {
"version": "1.0.0", "version": "1.0.0",
...@@ -6238,6 +6187,7 @@ ...@@ -6238,6 +6187,7 @@
"version": "1.5.10", "version": "1.5.10",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.5.10.tgz", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"dev": true,
"requires": { "requires": {
"debug": "=3.1.0" "debug": "=3.1.0"
} }
...@@ -7613,11 +7563,6 @@ ...@@ -7613,11 +7563,6 @@
"has-tostringtag": "^1.0.0" "has-tostringtag": "^1.0.0"
} }
}, },
"is-buffer": {
"version": "2.0.5",
"resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-2.0.5.tgz",
"integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ=="
},
"is-callable": { "is-callable": {
"version": "1.2.7", "version": "1.2.7",
"resolved": "https://registry.npmmirror.com/is-callable/-/is-callable-1.2.7.tgz", "resolved": "https://registry.npmmirror.com/is-callable/-/is-callable-1.2.7.tgz",
...@@ -8494,14 +8439,12 @@ ...@@ -8494,14 +8439,12 @@
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
"dev": true
}, },
"mime-types": { "mime-types": {
"version": "2.1.35", "version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"requires": { "requires": {
"mime-db": "1.52.0" "mime-db": "1.52.0"
} }
...@@ -8678,7 +8621,8 @@ ...@@ -8678,7 +8621,8 @@
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
}, },
"multicast-dns": { "multicast-dns": {
"version": "6.2.3", "version": "6.2.3",
...@@ -10815,6 +10759,11 @@ ...@@ -10815,6 +10759,11 @@
"ipaddr.js": "1.9.1" "ipaddr.js": "1.9.1"
} }
}, },
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"prr": { "prr": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
...@@ -13685,6 +13634,75 @@ ...@@ -13685,6 +13634,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"axios": "^0.18.0", "axios": "^1.4.0",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
......
<template> <template>
<div class="container content " v-loading="loading"> <div class="container content " v-loading="loading">
<el-form ref="materialAddForm" :model="materialAddForm" :label-width="defaultLabelWidth" <el-form ref="materialAddForm" :model="materialAddForm" :label-width="defaultLabelWidth" :rules="materialAddFormRules">
:rules="materialAddFormRules">
<div class="creat-material"> <div class="creat-material">
<h4>{{ title }}</h4> <h4>{{ title }}</h4>
<el-divider></el-divider> <el-divider></el-divider>
<div class="material-form">
<div class="m-l-20"> <div class="m-l-20">
<el-form-item label="选择门店:" prop="targetMerchantId"> <el-form-item label="选择门店:" prop="targetMerchantId">
<el-select remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore" <el-select remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore" v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel" clearable filterable :size="size" placeholder="请选择门店" @change="selectChange" @clear="clearDrop">
v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel" <el-option v-for="(item, i) in dataItems" :key="i" :label="item.merchantName" :value="item.merchantNo + ''"></el-option>
clearable filterable :size="size"
placeholder="请选择门店" @change="selectChange" @clear="clearDrop">
<el-option v-for="(item, i) in dataItems" :key="i" :label="item.merchantName"
:value="item.merchantNo + ''"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId"> <el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId">
<el-select v-model="materialAddForm.groupId" placeholder="全部" :size="size"> <el-select v-model="materialAddForm.groupId" placeholder="全部" :size="size">
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" <el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-else label="选择素材组:" prop="selectMaterialGroupName"> <el-form-item v-else label="选择素材组:" prop="selectMaterialGroupName">
<el-select v-model="materialAddForm.groupName" placeholder="全部" :size="size" disabled> <el-select v-model="materialAddForm.groupName" placeholder="全部" :size="size" disabled>
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" <el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="素材名称:" prop="materialName"> <el-form-item label="素材名称:" prop="materialName">
<el-input :disabled="notDisplayProperties" v-model="materialAddForm.materialName" :size="size" <el-input :disabled="notDisplayProperties" v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称" maxlength="30"></el-input>
placeholder="请输入素材名称"
maxlength="30"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="素材类型:" prop="materialType" class="materialType"> <el-form-item label="素材类型:" prop="materialType" class="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" <el-radio-group v-model="materialAddForm.materialType" @change="radioChange" :disabled="routeInfo.addOrEdit != 1">
:disabled="routeInfo.addOrEdit != 1">
<el-radio :label="1">PDF文件</el-radio> <el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> --> <!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio> <el-radio :label="3">图文</el-radio>
...@@ -42,11 +33,8 @@ ...@@ -42,11 +33,8 @@
<!-- 选择PDF --> <!-- 选择PDF -->
<div v-show="materialAddForm.materialType == 1"> <div v-show="materialAddForm.materialType == 1">
<div class="pdf-show"> <div class="pdf-show">
<input type="file" style="opacity: 0" accept=".pdf" <input type="file" style="opacity: 0" accept=".pdf" :disabled="notDisplayProperties" @change="e => handlePdfChange(e)" />
:disabled="notDisplayProperties" @change="e => handlePdfChange(e)"/> <el-button icon="el-icon-plus" :size="size" :disabled="notDisplayProperties">选择文件</el-button>
<el-button icon="el-icon-plus" :size="size"
:disabled="notDisplayProperties">选择文件
</el-button>
</div> </div>
<ul v-if="pdfName || materialAddForm.materialUrl"> <ul v-if="pdfName || materialAddForm.materialUrl">
<li class="pdf-show"> <li class="pdf-show">
...@@ -60,28 +48,24 @@ ...@@ -60,28 +48,24 @@
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox> <textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
<el-form-item label="图片:" class="photoWrap"> <el-form-item label="图片:" class="photoWrap">
<div class="img-div"> <div class="img-div">
<div class="put-img" v-for="(item,index) in materialAddForm.imageUrlList" :key="item" <div class="put-img" v-for="(item, index) in materialAddForm.imageUrlList" :key="item" v-show="materialAddForm.imageUrlList[index]">
v-show="materialAddForm.imageUrlList[index]"> <img :src="item" alt="" />
<img :src="item" alt=""/>
<div class="mask" v-if="item"> <div class="mask" v-if="item">
<h3> <h3>
<el-popover placement="top" trigger="click"> <el-popover placement="top" trigger="click">
<div> <div>
<img class="img-plus" :src="item" alt=""/> <img class="img-plus" :src="item" alt="" />
</div> </div>
<img slot="reference" src="@/assets/material/view.png" alt=""/> <img slot="reference" src="@/assets/material/view.png" alt="" />
</el-popover> </el-popover>
<img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt="" <img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt="" @click="deleteImg('imageUrlList', item)" />
@click="deleteImg('imageUrlList',item)"/>
</h3> </h3>
</div> </div>
</div> </div>
<div class="avatar-uploader-desc"> <div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i> <i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div> <div class="avatar-uploader-desc-word">上传照片</div>
<input :class="{disableUpload:notDisplayProperties}" :disabled="notDisplayProperties" type="file" <input :class="{ disableUpload: notDisplayProperties }" :disabled="notDisplayProperties" type="file" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e, 'imageUrlList')" />
style="opacity: 0" accept=".jpg, .jpeg, .png"
@change="e => handleImgChange(e,'imageUrlList')"/>
</div> </div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> --> <!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div> </div>
...@@ -94,19 +78,15 @@ ...@@ -94,19 +78,15 @@
</video> </video>
<div class="mask"> <div class="mask">
<h3> <h3>
<img slot="reference" src="@/assets/material/view.png" alt="" @click="viewVideo"/> <img slot="reference" src="@/assets/material/view.png" alt="" @click="viewVideo" />
<img v-if="!notDisplayProperties" class="del-img" <img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt="" @click="deleteImg(['videoUrl', 'coverUrl'])" />
src="@/assets/material/dele.png" alt="" @click="deleteImg('videoUrl')"/>
</h3> </h3>
</div> </div>
</div> </div>
<div class="avatar-uploader-desc"> <div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i> <i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传视频</div> <div class="avatar-uploader-desc-word">上传视频</div>
<input :class="{disableUpload:notDisplayProperties}" <input :class="{ disableUpload: notDisplayProperties }" :disabled="notDisplayProperties" type="file" style="opacity: 0" accept="video/*" @change="e => handleVideoChange(e, 'videoUrl')" />
:disabled="notDisplayProperties" type="file" style="opacity: 0"
accept="video/*"
@change="e =>handleVideoChange(e,'videoUrl')"/>
</div> </div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> --> <!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div> </div>
...@@ -115,6 +95,10 @@ ...@@ -115,6 +95,10 @@
<div class="space"></div> <div class="space"></div>
</el-form-item> </el-form-item>
</div> </div>
<!-- <div class="material-view"> -->
<material-view v-if="materialAddForm.materialType == 3" :materialAddForm="materialAddForm" :textBoxContent="textBoxContent"></material-view>
<!-- </div> -->
</div>
</div> </div>
<div class="track"> <div class="track">
<h4>追踪设置</h4> <h4>追踪设置</h4>
...@@ -124,16 +108,14 @@ ...@@ -124,16 +108,14 @@
<span slot="label"> <span slot="label">
<span class="label-word"> <span class="label-word">
业务类型 业务类型
<el-popover placement="top-start" width="200" trigger="hover" <el-popover placement="top-start" width="200" trigger="hover" content="给素材添加业务类型,客户可根据业务类型筛选,也可在客户浏览了该素材时能及时提醒跟进员工,以提高客户成单率。">
content="给素材添加业务类型,客户可根据业务类型筛选,也可在客户浏览了该素材时能及时提醒跟进员工,以提高客户成单率。"> <img slot="reference" src="@/assets/question.png" alt="" />
<img slot="reference" src="@/assets/question.png" alt=""/>
</el-popover> </el-popover>
: :
</span> </span>
</span> </span>
<el-checkbox-group v-model="materialAddForm.businessType"> <el-checkbox-group v-model="materialAddForm.businessType">
<el-checkbox :disabled="notDisplayProperties" v-for="value in businessTypes" :key="value.businessName" <el-checkbox :disabled="notDisplayProperties" v-for="value in businessTypes" :key="value.businessName" :label="value.id">
:label="value.id">
{{ value.businessName }} {{ value.businessName }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -161,38 +143,31 @@ ...@@ -161,38 +143,31 @@
<div class="share-desc" v-show="descVisible"> <div class="share-desc" v-show="descVisible">
<div class="share-desc-left m-l-20"> <div class="share-desc-left m-l-20">
<el-form-item label="分享标题:"> <el-form-item label="分享标题:">
<el-input :disabled="notDisplayProperties" v-model="materialAddForm.materialTitle" :size="size" <el-input :disabled="notDisplayProperties" v-model="materialAddForm.materialTitle" :size="size" maxlength="30" show-word-limit placeholder="请输入自定义标题"></el-input>
maxlength="30" show-word-limit
placeholder="请输入自定义标题"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述:"> <el-form-item label="描述:">
<el-input :disabled="notDisplayProperties" type="textarea" v-model="materialAddForm.description" <el-input :disabled="notDisplayProperties" type="textarea" v-model="materialAddForm.description" :size="size" maxlength="30" show-word-limit placeholder="请输入自定义描述"></el-input>
:size="size" maxlength="30"
show-word-limit placeholder="请输入自定义描述"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="封面:"> <el-form-item label="封面:">
<div class="img-div"> <div class="img-div">
<div class="put-img" v-show="materialAddForm.titleUrl"> <div class="put-img" v-show="materialAddForm.titleUrl">
<img :src="materialAddForm.titleUrl" alt=""/> <img :src="materialAddForm.titleUrl" alt="" />
<div class="mask" v-if="materialAddForm.titleUrl"> <div class="mask" v-if="materialAddForm.titleUrl">
<h3> <h3>
<el-popover placement="top" trigger="click"> <el-popover placement="top" trigger="click">
<div> <div>
<img class="img-plus" :src="materialAddForm.titleUrl" alt=""/> <img class="img-plus" :src="materialAddForm.titleUrl" alt="" />
</div> </div>
<img slot="reference" src="@/assets/material/view.png" alt=""/> <img slot="reference" src="@/assets/material/view.png" alt="" />
</el-popover> </el-popover>
<img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt="" <img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt="" @click="deleteImg('titleUrl')" />
@click="deleteImg('titleUrl')"/>
</h3> </h3>
</div> </div>
</div> </div>
<div class="avatar-uploader-desc"> <div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i> <i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div> <div class="avatar-uploader-desc-word">上传照片</div>
<input :class="{disableUpload:notDisplayProperties}" :disabled="notDisplayProperties" type="file" <input :class="{ disableUpload: notDisplayProperties }" :disabled="notDisplayProperties" type="file" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e, 'titleUrl')" />
style="opacity: 0" accept=".jpg, .jpeg, .png"
@change="e => handleImgChange(e,'titleUrl')"/>
</div> </div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> --> <!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div> </div>
...@@ -200,14 +175,14 @@ ...@@ -200,14 +175,14 @@
</div> </div>
<div class="share-desc-right"> <div class="share-desc-right">
<div class="share-desc-right-box"> <div class="share-desc-right-box">
<img class="share-desc-right-box-phone" src="@/assets/material/phone.png" alt=""/> <img class="share-desc-right-box-phone" src="@/assets/material/phone.png" alt="" />
<div class="content-show"> <div class="content-show">
<div> <div>
<div class="content-title">{{ materialAddForm.materialTitle }}</div> <div class="content-title">{{ materialAddForm.materialTitle }}</div>
<div class="content-word">{{ materialAddForm.description }}</div> <div class="content-word">{{ materialAddForm.description }}</div>
</div> </div>
<div class="content-show-img" v-show="materialAddForm.titleUrl"> <div class="content-show-img" v-show="materialAddForm.titleUrl">
<img :src="materialAddForm.titleUrl" alt=""/> <img :src="materialAddForm.titleUrl" alt="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -229,6 +204,7 @@ ...@@ -229,6 +204,7 @@
</template> </template>
<script> <script>
import textBox from '@/views/material/components/textBox' import textBox from '@/views/material/components/textBox'
import materialView from './components/MaterialView'
import SelectLabel from '@/views/material/components/selectLable' import SelectLabel from '@/views/material/components/selectLable'
import bigView from '@/components/big-view' import bigView from '@/components/big-view'
import upload from '@/api/uploadApi' import upload from '@/api/uploadApi'
...@@ -240,11 +216,13 @@ export default { ...@@ -240,11 +216,13 @@ export default {
components: { components: {
textBox, textBox,
SelectLabel, SelectLabel,
materialView,
bigView bigView
// pdfReviewDia // pdfReviewDia
}, },
data() { data() {
return { return {
limitSize: 50,
title: '创建营销素材', title: '创建营销素材',
titleObj: { titleObj: {
1: '创建营销素材', 1: '创建营销素材',
...@@ -270,7 +248,7 @@ export default { ...@@ -270,7 +248,7 @@ export default {
channelType: 1, channelType: 1,
merchantAccountLevel: [4] merchantAccountLevel: [4]
}, },
searchContentStorage:'', searchContentStorage: '',
materialAddForm: { materialAddForm: {
groupId: '', // 素材组id groupId: '', // 素材组id
groupName: '', groupName: '',
...@@ -294,19 +272,19 @@ export default { ...@@ -294,19 +272,19 @@ export default {
// phoneVisible: false, // phoneVisible: false,
businessTypes: [], businessTypes: [],
materialAddFormRules: { materialAddFormRules: {
targetMerchantId: [{required: true, message: '请选择门店', trigger: 'change'}], targetMerchantId: [{ required: true, message: '请选择门店', trigger: 'change' }],
groupId: [{required: true, message: '请选择素材组', trigger: 'change'}], groupId: [{ required: true, message: '请选择素材组', trigger: 'change' }],
materialName: [ materialName: [
{required: true, message: '请输入素材名称', trigger: 'change'}, { required: true, message: '请输入素材名称', trigger: 'change' },
{max: 30, message: '素材名称长度不能超过30', trigger: 'blur'} { max: 30, message: '素材名称长度不能超过30', trigger: 'blur' }
], ],
materialType: [{required: true, message: '请选择素材类型', trigger: 'change'}], materialType: [{ required: true, message: '请选择素材类型', trigger: 'change' }],
businessType: [{required: true, message: '请选择业务类型', trigger: 'change'}] businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }]
}, },
linkRules: { linkRules: {
link: [ link: [
{required: true, message: '请输入链接地址', trigger: 'change'}, { required: true, message: '请输入链接地址', trigger: 'change' },
{max: 150, message: '链接地址长度不能超过30', trigger: 'blur'} { max: 150, message: '链接地址长度不能超过30', trigger: 'blur' }
] ]
} }
} }
...@@ -326,7 +304,7 @@ export default { ...@@ -326,7 +304,7 @@ export default {
'el-select-loadmore': { 'el-select-loadmore': {
bind(el, binding) { bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
SELECTWRAP_DOM.addEventListener('scroll', function () { SELECTWRAP_DOM.addEventListener('scroll', function() {
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight const condition = this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) { if (condition) {
binding.value() binding.value()
...@@ -343,7 +321,7 @@ export default { ...@@ -343,7 +321,7 @@ export default {
}) })
}, },
selectChange(val) { selectChange(val) {
let params = {merchant: val} let params = { merchant: val }
this.materialAddForm.groupId = '' this.materialAddForm.groupId = ''
this.getMaterialList(params) this.getMaterialList(params)
}, },
...@@ -396,36 +374,68 @@ export default { ...@@ -396,36 +374,68 @@ export default {
}, 300) }, 300)
} else { } else {
this.dataItems = [] this.dataItems = []
this.loadUpData( this.loadUpData(this.pageData, '')
this.pageData,
''
)
} }
}, },
viewVideo() { viewVideo() {
this.dialogVisibleImg = true this.dialogVisibleImg = true
this.dialogSrc = this.materialAddForm.videoUrl this.dialogSrc = this.materialAddForm.videoUrl
}, },
// handleVideoChange(e) {
// let file = e.srcElement.files[0]
// let reader = new FileReader()
// // // 默认1MB
// const limitSize = 20
// const isLt = file.size / 1024 / 1024 < limitSize
// if (!isLt) {
// this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
// return true
// }
// reader.readAsDataURL(file)
// reader.onload = e => {
// const imgFile = e.target.result
// const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
// this.$apis.common.uploadVideoApi({file: base64}).then(res => {
// if (res) {
// this.materialAddForm.videoUrl = res
// }
// })
// }
// },
handleVideoChange(e) { handleVideoChange(e) {
let file = e.srcElement.files[0] const self = this
let reader = new FileReader() let file = e.target.files[0]
// // 默认1MB const isLt = file.size / 1024 / 1024 < this.limitSize
const limitSize = 20
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) { if (!isLt) {
this.$message.error('上传视频大小不能超过' + limitSize + 'MB!') this.$message.error('上传视频大小不能超过' + this.limitSize + 'MB!')
return true return true
} }
reader.readAsDataURL(file) self.loading = true
reader.onload = e => { upload.init().then(res => {
const imgFile = e.target.result if (res.status == 0) {
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] upload
this.$apis.common.uploadVideoApi({file: base64}).then(res => { .uploaded(file)
if (res) { .then(res => {
this.materialAddForm.videoUrl = res const videoUrl = res.video.url
} self.$set(self.materialAddForm, 'videoUrl', videoUrl)
self.$nextTick(() => {
self.getImgUrl(videoUrl).then(res => {
self.$set(self.materialAddForm, 'coverUrl', res)
})
})
self.loading = false
})
.finally(end => {
console.log(end)
})
upload.uploadEvent('', res => {
console.log(res, '视频上传完成')
})
upload.uploadEvent('media_progress', res => {
console.log(res)
}) })
} }
})
}, },
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.materialAddForm)) let params = JSON.parse(JSON.stringify(this.materialAddForm))
...@@ -470,7 +480,7 @@ export default { ...@@ -470,7 +480,7 @@ export default {
if (!imgHtml && !videoHtml) params.materialType = 5 if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6 if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4 if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4
if (this.materialAddForm.imageUrlList && this.materialAddForm.imageUrlList.length ) params.materialType = 3 if (this.materialAddForm.imageUrlList && this.materialAddForm.imageUrlList.length) params.materialType = 3
this.textBoxContent = encodeURIComponent(this.textBoxContent) this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent params.materialUrl = this.textBoxContent
} }
...@@ -487,7 +497,7 @@ export default { ...@@ -487,7 +497,7 @@ export default {
await this.$apis.material.materialDetail(params).then(res => { await this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res this.materialAddForm = res
this.materialAddForm.targetMerchantId = res.merchantId + '' || '' this.materialAddForm.targetMerchantId = res.merchantId + '' || ''
this.getMaterialList({merchant: res.merchantId}) this.getMaterialList({ merchant: res.merchantId })
if (res.businessType) { if (res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',') const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item)) this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
...@@ -571,7 +581,7 @@ export default { ...@@ -571,7 +581,7 @@ export default {
reader.onload = e => { reader.onload = e => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.slice(-3) + '@' + imgFile.split(',')[1] const base64 = file.name.slice(-3) + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({file: base64}).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
this.pdfUrl = res this.pdfUrl = res
this.pdfName = file.name this.pdfName = file.name
...@@ -599,7 +609,7 @@ export default { ...@@ -599,7 +609,7 @@ export default {
reader.onload = e => { reader.onload = e => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({file: base64}).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
if (Array.isArray(this.materialAddForm[params]) || this.materialAddForm[params] == null) { if (Array.isArray(this.materialAddForm[params]) || this.materialAddForm[params] == null) {
if (this.materialAddForm[params] && this.materialAddForm[params].length > 8) { if (this.materialAddForm[params] && this.materialAddForm[params].length > 8) {
...@@ -632,7 +642,7 @@ export default { ...@@ -632,7 +642,7 @@ export default {
reader.onload = e => { reader.onload = e => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({file: base64}).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
if (Array.isArray(this.materialAddForm[params]) || this.materialAddForm[params] == null) { if (Array.isArray(this.materialAddForm[params]) || this.materialAddForm[params] == null) {
if (this.materialAddForm[params] && this.materialAddForm[params].length > 8) { if (this.materialAddForm[params] && this.materialAddForm[params].length > 8) {
...@@ -761,8 +771,13 @@ export default { ...@@ -761,8 +771,13 @@ export default {
}, },
// 删除上传图片 // 删除上传图片
deleteImg(params, content) { deleteImg(params, content) {
if (Array.isArray(params)) {
params.forEach(val => {
this.materialAddForm[val] = ''
})
}
if (Array.isArray(this.materialAddForm[params])) { if (Array.isArray(this.materialAddForm[params])) {
this.materialAddForm[params] = this.materialAddForm[params].filter((item) => item !== content); this.materialAddForm[params] = this.materialAddForm[params].filter(item => item !== content)
} else { } else {
this.materialAddForm[params] = '' this.materialAddForm[params] = ''
} }
...@@ -780,8 +795,8 @@ export default { ...@@ -780,8 +795,8 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.materialType{ .materialType {
/deep/.el-form-item__content{ /deep/.el-form-item__content {
max-width: 85%; max-width: 85%;
} }
} }
...@@ -832,7 +847,10 @@ export default { ...@@ -832,7 +847,10 @@ export default {
padding-left: 0; padding-left: 0;
width: 100px; width: 100px;
} }
.material-form {
display: flex;
justify-content: space-between;
}
.creat-material, .creat-material,
.track, .track,
.share, .share,
......
<template>
<div class="material-view">
<div class="material-view-container">
<el-carousel :height="height + 'px'" interval="100000" @change="handleChange" v-if="fileList.length">
<el-carousel-item v-for="item in fileList" :key="item">
<div class="carousel-item">
<img :src="item.url" class="carousel-img" />
<img src="@/assets/material/videoIcon.png" class="play" v-if="item.type == 'video'" />
</div>
</el-carousel-item>
</el-carousel>
<div class="material-text" v-html="textBoxContent"></div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
height: 200,
fileList: []
}
},
watch: {
materialAddForm: {
async handler(val) {
const fileList = val.imageUrlList.map(item => {
return {
type: 'img',
url: item
}
})
this.fileList = val.videoUrl ? fileList.concat({ url: val.coverUrl, type: 'video' }) : fileList
if (this.fileList.length) {
for (let i in this.fileList) {
this.$set(this.fileList[i], 'height', await this.getHeight(this.fileList[i].url))
}
this.height = this.fileList[0].height
}
},
deep: true,
immediate: true
}
},
props: {
materialAddForm: {
type: Object,
default: () => {}
},
textBoxContent: {
type: String
}
},
methods: {
getHeight(url) {
return new Promise(resolve => {
const img = new Image()
img.src = url
img.onload = res => {
console.log(img.width, img.height)
resolve((img.width / img.height) * 250)
}
})
},
handleChange(e) {
this.height = this.fileList[e].height
}
}
}
</script>
<style lang="scss" scoped>
.material-view {
width: 289.47px;
height: 566px;
background: url('../../../assets/phone.png');
background-size: 100% 100%;
position: relative;
overflow: hidden;
.material-view-container {
position: absolute;
top: 56px;
left: 20px;
width: calc(100% - 40px);
height: calc(100% - 112px);
overflow-y: auto;
/deep/ .el-carousel__button {
width: 8px;
}
.carousel-item {
position: relative;
height: 100%;
width: 100%;
.carousel-img {
width: 100%;
height: 100%;
}
.play {
position: absolute;
width: 30px;
height: 30px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.material-text {
word-wrap: break-word;
img {
width: 100% !important;
}
}
}
}
</style>
<style>
.material-text img {
width: 100% !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!