Commit 7aba3186 authored by 姬鋆屾's avatar 姬鋆屾

添加图片预览

parent 77f50345
...@@ -453,17 +453,26 @@ export default { ...@@ -453,17 +453,26 @@ export default {
formatterPic(row, column, val) { formatterPic(row, column, val) {
const content = formatter(this.tableData, column, val); const content = formatter(this.tableData, column, val);
if (content) { if (content) {
return ( const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
<el-image const regular = new RegExp(`.*\.${suffix}`);
src={val.indexOf("http") == -1 ? baseUrl + val : val} if (regular.test(val)) {
preview-src-list={val.indexOf("http") == -1 ? baseUrl + val : val} return (
style="width: 100px" <el-image
></el-image> src={val.indexOf("http") == -1 ? baseUrl + val : val}
); preview-src-list={
val.indexOf("http") == -1 ? [baseUrl + val] : [val]
}
style="width: 100px"
></el-image>
);
} else {
return <el-link type="primary">{val}</el-link>;
}
} else { } else {
return val; return val;
} }
}, },
// 考勤组格式 // 考勤组格式
formatterBanci(row, column, val) { formatterBanci(row, column, val) {
const content = formatter(this.tableData, column, val); const content = formatter(this.tableData, column, val);
......
...@@ -80,7 +80,11 @@ ...@@ -80,7 +80,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckAttendRecordList", name: "CheckAttendRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "考勤绩效记录核查信息导入"; this.upload.title = "考勤绩效记录核查信息导入";
...@@ -213,6 +225,7 @@ export default { ...@@ -213,6 +225,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -95,7 +95,11 @@ ...@@ -95,7 +95,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckComplainRecordList", name: "CheckComplainRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "评价绩效投诉核查信息导入"; this.upload.title = "评价绩效投诉核查信息导入";
...@@ -218,6 +230,7 @@ export default { ...@@ -218,6 +230,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -72,7 +72,11 @@ ...@@ -72,7 +72,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckEffectRecordList", name: "CheckEffectRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "效能绩效核查信息导入"; this.upload.title = "效能绩效核查信息导入";
...@@ -217,9 +229,10 @@ export default { ...@@ -217,9 +229,10 @@ export default {
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -74,7 +74,11 @@ ...@@ -74,7 +74,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckGoworkRecordList", name: "CheckGoworkRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "办件绩效核查信息导入"; this.upload.title = "办件绩效核查信息导入";
...@@ -208,6 +220,7 @@ export default { ...@@ -208,6 +220,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -70,7 +70,11 @@ ...@@ -70,7 +70,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckOtherRecordList", name: "CheckOtherRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "其它绩效核查信息导入"; this.upload.title = "其它绩效核查信息导入";
...@@ -213,9 +225,10 @@ export default { ...@@ -213,9 +225,10 @@ export default {
// }, // },
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, // { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -75,7 +75,11 @@ ...@@ -75,7 +75,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "CheckReviewRecordList", name: "CheckReviewRecordList",
components: { components: {
...@@ -71,6 +73,16 @@ export default { ...@@ -71,6 +73,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "评价差评绩效核查信息导入"; this.upload.title = "评价差评绩效核查信息导入";
...@@ -217,6 +229,7 @@ export default { ...@@ -217,6 +229,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -78,6 +78,8 @@ ...@@ -78,6 +78,8 @@
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import BarCharts from "./components/BarCharts.vue"; import BarCharts from "./components/BarCharts.vue";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformAttendAppealList", name: "PerformAttendAppealList",
components: { components: {
...@@ -89,6 +91,16 @@ export default { ...@@ -89,6 +91,16 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
handleClick() { handleClick() {
this.getData(); this.getData();
}, },
...@@ -209,7 +221,7 @@ export default { ...@@ -209,7 +221,7 @@ export default {
prop: "irregularType", prop: "irregularType",
formatter: this.formatter, formatter: this.formatter,
}, },
{ label: "绩效规则", prop: "ruleId", formatter: this.formatter }, { label: "绩效规则", prop: "ruleId", formatter: this.formatter },
{ {
......
...@@ -132,7 +132,11 @@ ...@@ -132,7 +132,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformAttendRecordList", name: "PerformAttendRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "考勤绩效记录信息导入"; this.upload.title = "考勤绩效记录信息导入";
...@@ -219,9 +231,10 @@ export default { ...@@ -219,9 +231,10 @@ export default {
{ label: "异常结果", prop: "errorResult" }, { label: "异常结果", prop: "errorResult" },
/* /*
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
*/ */
...@@ -229,6 +242,7 @@ export default { ...@@ -229,6 +242,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -184,7 +184,11 @@ ...@@ -184,7 +184,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformComplainRecordList", name: "PerformComplainRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "评价绩效投诉记录信息导入"; this.upload.title = "评价绩效投诉记录信息导入";
...@@ -225,6 +237,7 @@ export default { ...@@ -225,6 +237,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -158,7 +158,11 @@ ...@@ -158,7 +158,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformEffectRecordList", name: "PerformEffectRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "效能绩效记录信息导入"; this.upload.title = "效能绩效记录信息导入";
...@@ -228,6 +240,7 @@ export default { ...@@ -228,6 +240,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
......
...@@ -136,7 +136,11 @@ ...@@ -136,7 +136,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformGoworkRecordList", name: "PerformGoworkRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "办件绩效记录信息导入"; this.upload.title = "办件绩效记录信息导入";
...@@ -215,6 +227,7 @@ export default { ...@@ -215,6 +227,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
......
...@@ -96,7 +96,11 @@ ...@@ -96,7 +96,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformOtherRecordList", name: "PerformOtherRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "其它绩效记录信息导入"; this.upload.title = "其它绩效记录信息导入";
...@@ -224,11 +236,16 @@ export default { ...@@ -224,11 +236,16 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
{ label: "加分/扣分方式", prop: "subMethod", formatter: this.formatter }, {
label: "加分/扣分方式",
prop: "subMethod",
formatter: this.formatter,
},
{ {
label: "加分/扣分时间", label: "加分/扣分时间",
......
...@@ -149,7 +149,11 @@ ...@@ -149,7 +149,11 @@
: form.filePaths : form.filePaths
}` }`
" "
:preview-src-list="form.filePaths" :preview-src-list="
form.filePaths.indexOf('http') == -1
? [baseUrl + form.filePaths]
: [form.filePaths]
"
> >
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
import { downloadFile } from "@/assets/utils/index";
export default { export default {
name: "PerformReviewRecordList", name: "PerformReviewRecordList",
components: { components: {
...@@ -79,6 +81,16 @@ export default { ...@@ -79,6 +81,16 @@ export default {
mixins: [table], mixins: [table],
created() {}, created() {},
methods: { methods: {
handleCellClick(row, column, event, cell) {
if ((column.label = "图片凭证")) {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "评价差评绩效记录信息导入"; this.upload.title = "评价差评绩效记录信息导入";
...@@ -225,6 +237,7 @@ export default { ...@@ -225,6 +237,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
width: 150,
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