Commit dd10cf13 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 759b05a3 b029236b
...@@ -51,12 +51,10 @@ export const encodeURI = (data) => { ...@@ -51,12 +51,10 @@ export const encodeURI = (data) => {
* @returns {string} val 解析后的结果 * @returns {string} val 解析后的结果
*/ */
export function formatterDate(time) { export function formatterDate(time) {
console.log("time",time)
if(time==='undefined'||time===null) { if(time==='undefined'||time===null) {
return '--'} return '--'}
if (!time) return '--'; if (!time) return '--';
console.log("time11111",time)
let date = new Date(Number(time)); let date = new Date(Number(time));
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
......
...@@ -68,10 +68,21 @@ ...@@ -68,10 +68,21 @@
{{ form.deductPerson ? form.deductPerson : "--" }}</el-col {{ form.deductPerson ? form.deductPerson : "--" }}</el-col
> >
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image>
</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
...@@ -391,7 +402,7 @@ export default { ...@@ -391,7 +402,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val || val !== "--") { if (val) {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -84,10 +84,20 @@ ...@@ -84,10 +84,20 @@
{{ form.deductTime ? form.deductTime : "--" }}</el-col {{ form.deductTime ? form.deductTime : "--" }}</el-col
> >
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--" <el-image
}}</el-col style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image
></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -61,10 +61,20 @@ ...@@ -61,10 +61,20 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
图片凭证:{{ 图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--" <el-image
}}</el-col style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image
></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
...@@ -248,8 +258,8 @@ ...@@ -248,8 +258,8 @@
/> />
<Field <Field
label="图片凭证地址" label="图片凭证地址"
prop="snapPath" prop="filePaths"
v-model="form.snapPath" v-model="form.filePaths"
type="textarea" type="textarea"
placeholder="请输入图片凭证地址" placeholder="请输入图片凭证地址"
/> />
...@@ -554,7 +564,7 @@ export default { ...@@ -554,7 +564,7 @@ export default {
happenTime: null, happenTime: null,
duration: 0, duration: 0,
alarmTime: null, alarmTime: null,
snapPath: "", filePaths: "",
ruleId: null, ruleId: null,
ruleName: "", ruleName: "",
subMethod: 1, subMethod: 1,
......
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{{ util_formatterDate(form.alarmTime)}} {{ util_formatterDate(form.alarmTime)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.snapPath}} {{form.filePaths}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass">
{{form.ruleId}} {{form.ruleId}}
......
...@@ -63,10 +63,20 @@ ...@@ -63,10 +63,20 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
图片凭证:{{ 图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--" <el-image
}}</el-col style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image
></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
......
...@@ -207,7 +207,7 @@ export default { ...@@ -207,7 +207,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -59,10 +59,20 @@ ...@@ -59,10 +59,20 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24" <el-col :span="24"
>图片凭证:{{ >图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--" <el-image
}}</el-col style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image
></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
......
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, // { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -64,10 +64,20 @@ ...@@ -64,10 +64,20 @@
<el-row> <el-row>
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:
form.snapPath ? picMatter(form.snapPath) : "--" <el-image
}}</el-col style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
> >
</el-image
></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
......
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>异常时间:{{ formatterDate(form.errorTime)}}</el-col >异常时间:{{ formatterDate(form.errorTime) }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>上下班时间:{{ >上下班时间:{{
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10" <el-col :span="10"
>实际打卡时间:{{formatterDate(form.actualAttendTime)}}</el-col >实际打卡时间:{{ formatterDate(form.actualAttendTime) }}</el-col
> >
<el-col :span="9" <el-col :span="9"
>异常结果:{{ >异常结果:{{
...@@ -54,15 +54,15 @@ ...@@ -54,15 +54,15 @@
> >
<el-col :span="5" <el-col :span="5"
>加分/扣分方式:{{ >加分/扣分方式:{{
form.subAddType ? form.subAddType : "--" form.subAddType
? util_formatter("subAddType", form.subAddType)
: "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" <el-col :span="8"
>加分/扣分时间:{{ >加分/扣分时间:{{ formatterDate(form.deductTime) }}</el-col
formatterDate(form.deductTime)
}}</el-col
> >
<el-col :span="8" <el-col :span="8"
>加分/扣分人员:{{ >加分/扣分人员:{{
...@@ -78,7 +78,9 @@ ...@@ -78,7 +78,9 @@
<el-row> <el-row>
<el-col :span="8" <el-col :span="8"
>核查结果:{{ >核查结果:{{
form.checkResult ? form.checkResult : "--" form.checkResult
? util_formatter("checkResult", form.checkResult)
: "--"
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
...@@ -113,7 +115,7 @@ ...@@ -113,7 +115,7 @@
>申诉说明:{{ form.appealDesc ? form.appealDesc : "--" }}</el-col >申诉说明:{{ form.appealDesc ? form.appealDesc : "--" }}</el-col
> >
<el-col :span="24" <el-col :span="24"
>申诉时间:{{ formatterDate(form.appealTime)}}</el-col >申诉时间:{{ formatterDate(form.appealTime) }}</el-col
> >
<el-col :span="24" <el-col :span="24"
>申诉附件: >申诉附件:
...@@ -135,17 +137,21 @@ ...@@ -135,17 +137,21 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<div class="box" v-if="form.view == '查看' || form.processStatus == 2"> <div class="box" v-if="form.view == '查看'">
<div class="title">申诉结果</div> <div class="title">申诉结果</div>
<div class="content"> <div class="content">
<el-row> <el-row>
<el-col :span="8" <el-col :span="8"
>申诉结果:{{ >申诉结果:{{
form.appealResult ? form.appealResult : "--" form.appealResult
? util_formatter("appealResult", form.appealResult)
: "--"
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>处理人员{{util_formatter('updateUserId',form.updateUserId+"")}}</el-col >处理人员:{{
util_formatter("updateUserId", form.updateUserId + "")
}}</el-col
> >
<el-col :span="8" <el-col :span="8"
>处理时间: {{ formatterDate(form.updateTime) }}</el-col >处理时间: {{ formatterDate(form.updateTime) }}</el-col
...@@ -479,14 +485,19 @@ export default { ...@@ -479,14 +485,19 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
toString: ["subMethod", "subAddType", "processStatus", "appealResult", "updateUserId"], toString: [
"subMethod",
"subAddType",
"processStatus",
"appealResult",
"updateUserId",
],
toDate: [ toDate: [
"attendanceDate", "attendanceDate",
"errorTime", "errorTime",
"actualAttendTime", "actualAttendTime",
"checkTime", "checkTime",
"appealTime", "appealTime",
], ],
// 表单校验 // 表单校验
rules: { rules: {
...@@ -581,39 +592,14 @@ export default { ...@@ -581,39 +592,14 @@ export default {
this.$get("/perform/attend/appeal/info", { id: row.id }).then((res) => { this.$get("/perform/attend/appeal/info", { id: row.id }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.form = res.data; this.form = res.data;
this.dict = res.dict;
} else { } else {
this.reset(); this.reset();
} }
for (let key in this.form) {
key == "actualAttendTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "attendanceDate"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "createTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "errorTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "updateTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "checkTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "reviewTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "appealTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "complainTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "happenTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "alarmTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "alarmTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: "";
}
this.form.appealResult = ""; this.form.appealResult = "";
this.form.processStatus = 2; this.form.processStatus = 2;
this.form.remark = ""; this.form.remark = "";
this.form.view = "核查";
this.open = true; this.open = true;
}); });
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
......
...@@ -122,7 +122,18 @@ ...@@ -122,7 +122,18 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.filePaths ? picMatter(form.filePaths) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
...@@ -439,7 +450,9 @@ export default { ...@@ -439,7 +450,9 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -453,7 +466,6 @@ export default { ...@@ -453,7 +466,6 @@ export default {
// this.urls.currUrl = "perform/attend/record/edit"; // this.urls.currUrl = "perform/attend/record/edit";
// this.getData(); // this.getData();
this.$get("/perform/attend/record/info", { id: row.id }).then((res) => { this.$get("/perform/attend/record/info", { id: row.id }).then((res) => {
console.log(res.data);
if (res.code == 1) { if (res.code == 1) {
this.form = res.data; this.form = res.data;
} else { } else {
...@@ -488,6 +500,8 @@ export default { ...@@ -488,6 +500,8 @@ export default {
}).then((res) => { }).then((res) => {
this.ruleArr = res.data.data; this.ruleArr = res.data.data;
}); });
this.form.filePaths = this.form.filePaths ? this.form.filePaths : "";
console.log(this.form);
this.open = true; this.open = true;
}); });
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
...@@ -572,7 +586,7 @@ export default { ...@@ -572,7 +586,7 @@ export default {
errorResult: "", errorResult: "",
errorTime: "", errorTime: "",
fileNames: "", fileNames: "",
snapPath: "", filePaths: "",
goOffTimeStr: "", goOffTimeStr: "",
processStatus: 1, processStatus: 1,
remark: "", remark: "",
......
...@@ -221,7 +221,7 @@ export default { ...@@ -221,7 +221,7 @@ export default {
/* /*
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
*/ */
......
...@@ -174,11 +174,22 @@ ...@@ -174,11 +174,22 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -502,7 +513,9 @@ export default { ...@@ -502,7 +513,9 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
let arr = this.staffArr.filter((v) => v.id == val); let arr = this.staffArr.filter((v) => v.id == val);
...@@ -583,7 +596,7 @@ export default { ...@@ -583,7 +596,7 @@ export default {
score: "", score: "",
processStatus: 1, processStatus: 1,
remark: "", remark: "",
snapPath: "", filePaths: "",
fileNames: "", fileNames: "",
}; };
this.open = true; this.open = true;
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -148,11 +148,22 @@ ...@@ -148,11 +148,22 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -278,8 +289,8 @@ ...@@ -278,8 +289,8 @@
/> />
<Field <Field
label="图片凭证地址" label="图片凭证地址"
prop="snapPath" prop="filePaths"
v-model="form.snapPath" v-model="form.filePaths"
type="textarea" type="textarea"
placeholder="请输入图片凭证地址" placeholder="请输入图片凭证地址"
/> />
...@@ -473,7 +484,10 @@ export default { ...@@ -473,7 +484,10 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -609,7 +623,7 @@ export default { ...@@ -609,7 +623,7 @@ export default {
happenTime: null, happenTime: null,
duration: 0, duration: 0,
alarmTime: null, alarmTime: null,
snapPath: "", filePaths: "",
ruleId: null, ruleId: null,
ruleName: "", ruleName: "",
subMethod: "", subMethod: "",
......
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{ label: "图片凭证地址", prop: "snapPath" }, { label: "图片凭证地址", prop: "filePaths" },
{ label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
{{ util_formatterDate(form.alarmTime)}} {{ util_formatterDate(form.alarmTime)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.snapPath}} {{form.filePaths}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass">
{{form.ruleId}} {{form.ruleId}}
......
...@@ -126,11 +126,22 @@ ...@@ -126,11 +126,22 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -442,7 +453,9 @@ export default { ...@@ -442,7 +453,9 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
......
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
......
...@@ -86,11 +86,22 @@ ...@@ -86,11 +86,22 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -403,8 +414,9 @@ export default { ...@@ -403,8 +414,9 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form.snapPath);
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -445,7 +457,7 @@ export default { ...@@ -445,7 +457,7 @@ export default {
: ""; : "";
} }
this.form.processStatus = 2; this.form.processStatus = 2;
this.form.snapPath ? "" : (this.form.snapPath = ""); this.form.filePaths ? "" : (this.form.filePaths = "");
this.form.view = "核查"; this.form.view = "核查";
this.staffChange(this.form.staffId); this.staffChange(this.form.staffId);
this.$post("/perform/rules/list", { this.$post("/perform/rules/list", {
...@@ -546,7 +558,7 @@ export default { ...@@ -546,7 +558,7 @@ export default {
remark: "", remark: "",
categoryId: "", categoryId: "",
happenTime: "", happenTime: "",
snapPath: "", filePaths: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, // { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
......
...@@ -139,11 +139,22 @@ ...@@ -139,11 +139,22 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} <el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -457,7 +468,9 @@ export default { ...@@ -457,7 +468,9 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.snapPath = val; this.form.filePaths = val;
this.$forceUpdate(this.form);
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -587,7 +600,7 @@ export default { ...@@ -587,7 +600,7 @@ export default {
deptId: "", deptId: "",
deptName: "", deptName: "",
fileNames: "", fileNames: "",
snapPath: "", filePaths: "",
processStatus: 1, processStatus: 1,
remark: "", remark: "",
reviewDevice: "", reviewDevice: "",
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "snapPath", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
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 to comment