Merge branch 'master' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
@ -42,6 +42,7 @@ public class SysFileUploadController extends BaseController {
|
||||
if (StringUtils.isNotEmpty(fileUrl)) {
|
||||
ajax = AjaxResult.success();
|
||||
ajax.put("fileUrl", fileUrl);
|
||||
ajax.put("previewUrl", AliyunOSSUtils.generatePresignedUrl(fileUrl));
|
||||
ajax.put("fileName", file.getOriginalFilename());
|
||||
} else {
|
||||
ajax = AjaxResult.error("文件上传失败");
|
||||
|
@ -3,6 +3,7 @@ package com.stdiet.common.utils.oss;
|
||||
import com.aliyun.oss.model.GetObjectRequest;
|
||||
import com.aliyun.oss.model.OSSObject;
|
||||
import com.stdiet.common.config.AliyunOSSConfig;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
import com.stdiet.common.utils.file.FileUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@ -233,6 +234,9 @@ public class AliyunOSSUtils {
|
||||
* @return
|
||||
*/
|
||||
public static String generatePresignedUrl(String fileUrl){
|
||||
if(StringUtils.isEmpty(fileUrl)) {
|
||||
return null;
|
||||
}
|
||||
// 创建OSSClient实例。
|
||||
OSS ossClient = getOssClient();
|
||||
|
||||
|
@ -35,8 +35,15 @@
|
||||
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
|
||||
<include refid="selectSysCustomerVo"/>
|
||||
where del_flag = 0
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%') or phone like concat('%', #{name}, '%')</if>
|
||||
<if test="mainDietitian != null and mainDietitian != ''"> and main_dietitian = #{mainDietitian}</if>
|
||||
<if test="mainDietitian == 0"> and isnull(main_dietitian) or main_dietitian=0</if>
|
||||
<if test="salesman != null and salesman != ''"> and salesman = #{salesman}</if>
|
||||
<if test="salesman == 0"> and isnull(salesman) or salesman=0</if>
|
||||
<if test="afterDietitian != null and afterDietitian != ''"> and after_dietitian = #{afterDietitian}</if>
|
||||
<if test="afterDietitian == 0"> and isnull(after_dietitian) or after_dietitian=0</if>
|
||||
<if test="assistantDietitian != null and assistantDietitian != ''"> and assistant_dietitian = #{assistantDietitian}</if>
|
||||
<if test="assistantDietitian == 0"> and isnull(assistant_dietitian) or assistant_dietitian=0</if>
|
||||
<if test="fansChannel != null "> and fans_channel = #{fansChannel}</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
@ -21,10 +21,15 @@ export default {
|
||||
if (
|
||||
this.value &&
|
||||
typeof this.value === "string" &&
|
||||
this.value.includes("</br>")
|
||||
(this.value.includes("</br>") || this.value.includes("\n"))
|
||||
) {
|
||||
this.newLine = true;
|
||||
return this.value.split("</br>");
|
||||
if (this.value.includes("</br>")) {
|
||||
return this.value.split("</br>");
|
||||
} else if (this.value.includes("\n")) {
|
||||
return this.value.split("\n");
|
||||
}
|
||||
return this.value;
|
||||
}
|
||||
return this.value;
|
||||
},
|
||||
|
@ -7,24 +7,16 @@
|
||||
v-show="showSearch"
|
||||
label-width="86px"
|
||||
>
|
||||
<el-form-item label="名字" prop="name">
|
||||
<el-form-item label="客户信息" prop="name">
|
||||
<el-input
|
||||
v-model.trim="queryParams.name"
|
||||
placeholder="请输入名字"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model.trim="queryParams.phone"
|
||||
placeholder="请输入手机号"
|
||||
placeholder="请输入名字或手机号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="进粉渠道" prop="fansChannel">
|
||||
<el-select v-model="queryParams.fansChannel" placeholder="请选择">
|
||||
<el-option
|
||||
@ -35,39 +27,51 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="营养师助理" prop="assistantDietitian">
|
||||
<el-input
|
||||
v-model="queryParams.assistantDietitian"
|
||||
placeholder="请输入营养师助理"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="营养师" prop="mainDietitian">
|
||||
<el-select v-model="queryParams.mainDietitian" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in nutritionistIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="售后营养师" prop="afterDietitian">
|
||||
<el-input
|
||||
v-model="queryParams.afterDietitian"
|
||||
placeholder="请输入售后营养师"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="营养师助理" prop="assistantDietitian">
|
||||
<el-select
|
||||
v-model="queryParams.assistantDietitian"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in nutriAssisIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售人员" prop="salesman">
|
||||
<el-input
|
||||
v-model="queryParams.salesman"
|
||||
placeholder="请输入销售人员"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-select v-model="queryParams.salesman" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in preSaleIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="售后营养师" prop="afterDietitian">
|
||||
<el-select v-model="queryParams.afterDietitian" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in afterSaleIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="cyan"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
<el-button type="cyan" icon="el-icon-search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
|
@ -357,7 +357,9 @@
|
||||
<em class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
<div style="font-size: 12px; color: #8c8c8c">最多可上传5个文件,且每个文件不超过10M</div>
|
||||
<div style="font-size: 12px; color: #8c8c8c">
|
||||
最多可上传5个文件,且每个文件不超过10M
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@ -598,8 +600,18 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateIngredient(this.form).then((response) => {
|
||||
const params = JSON.parse(JSON.stringify(this.form));
|
||||
params.imgList = params.imgList.reduce((arr, cur) => {
|
||||
if (cur.url) {
|
||||
arr.push({
|
||||
url: cur.url.substring(0, cur.url.indexOf("?")),
|
||||
name: cur.name,
|
||||
});
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
if (params.id != null) {
|
||||
updateIngredient(params).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -607,7 +619,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addIngredient(this.form).then((response) => {
|
||||
addIngredient(params).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -658,7 +670,7 @@ export default {
|
||||
this.form.imgList = fileList.map((data) => {
|
||||
const { name, url, response } = data;
|
||||
if (response) {
|
||||
return { url: response.fileUrl, name: response.fileName };
|
||||
return { url: response.previewUrl, name: response.fileName };
|
||||
}
|
||||
return { url, name };
|
||||
});
|
||||
|
@ -266,7 +266,7 @@ export default {
|
||||
},
|
||||
],
|
||||
};
|
||||
console.log(option);
|
||||
// console.log(option);
|
||||
this.chart.setOption(option);
|
||||
},
|
||||
handleOnViewChange(view) {
|
||||
|
Reference in New Issue
Block a user