aos-element
Version:
A Component Library for Vue.js.
1,377 lines (1,326 loc) • 46.2 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 105);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functional component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 105:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/aos-flow-history/src/main.vue?vue&type=template&id=ad8426fc&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{ staticClass: "aos-flow-history" },
[
_c(
"div",
{ attrs: { type: "detail" } },
[
_c(
"div",
{ staticClass: "radio" },
[
_c(
"el-radio-group",
{
on: { change: _vm.handleSortChange },
model: {
value: _vm.reverse,
callback: function($$v) {
_vm.reverse = $$v
},
expression: "reverse"
}
},
[
_c("el-radio-button", { attrs: { label: false } }, [
_vm._v("正序")
]),
_c("el-radio-button", { attrs: { label: true } }, [
_vm._v("倒序")
])
],
1
),
_c(
"el-radio-group",
{
staticClass: "aos-flow-history__showClaim",
on: { change: _vm.handleShowClaim },
model: {
value: _vm.isShowClaimData,
callback: function($$v) {
_vm.isShowClaimData = $$v
},
expression: "isShowClaimData"
}
},
[
_c("el-radio-button", { attrs: { label: true } }, [
_vm._v("显示认领")
]),
_c("el-radio-button", { attrs: { label: false } }, [
_vm._v("不显示认领")
])
],
1
),
_vm.showComment
? _c(
"el-button",
{
staticClass: "aos-flow-history__comment",
attrs: { type: "primary" },
on: { click: _vm.handleShowDrawer }
},
[_vm._v("评论 (" + _vm._s(_vm.total) + "条)")]
)
: _vm._e()
],
1
),
_vm._l(_vm.translateHistoryDetailList, function(ele) {
return _c("div", { key: ele.id, staticClass: "appro" }, [
_c("div", { staticClass: "title" }, [
_c("span", [
_vm._v(
_vm._s(_vm.$time.formatTime(ele.date, _vm.dateFormat, "/"))
)
]),
_c("span", [
_vm._v(
_vm._s(_vm.$time.formatTime(ele.date, _vm.timeFormat, "/"))
)
])
]),
_c("div", { staticClass: "icon" }, [
_vm._m(0, true),
(_vm.reverse && ele.type !== "PROCESS_STARTED") ||
(!_vm.reverse && ele.type !== "PROCESS_COMPLETED")
? _c("div", { staticClass: "icon-line" })
: _vm._e()
]),
_c("div", { staticClass: "result" }, [
_c(
"div",
{ staticClass: "result-title" },
[
_c("span", { staticClass: "title" }, [
_vm._v(_vm._s(ele.taskName))
]),
ele.typeName
? _c(
"el-tag",
{ attrs: { type: _vm.tagType(ele), size: "mini" } },
[_vm._v(_vm._s(ele.typeName))]
)
: _vm._e()
],
1
),
_vm.startEndType.indexOf(ele.type) < 0
? _c("div", { staticClass: "result-text" }, [
_c("span", { staticClass: "name" }, [
_vm._v(_vm._s(ele.userName))
]),
ele.orgName
? _c("span", { staticClass: "branch" }, [
_vm._v(_vm._s(ele.orgName))
])
: _vm._e()
])
: _vm._e(),
_vm.startEndType.indexOf(ele.type) < 0 &&
(ele.remindMessage ||
ele.innerRemindMessage ||
ele.reasonMessage ||
ele.suspendedaReasonDict ||
ele.rejectReasonDict ||
ele.refuseReasonDict)
? _c("div", { staticClass: "result-message" }, [
ele.reasonMessage &&
["suspend", "turnToward", "transfer"].indexOf(ele.type) <
0
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("有条件通过意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.reasonMessage))]
)
]
)
: _vm._e(),
ele.remindMessage
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("审批意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.remindMessage))]
)
]
)
: _vm._e(),
ele.innerRemindMessage
? _c(
"span",
{
staticClass: "result-message__container",
staticStyle: { color: "#909399" }
},
[
_vm._v("内部意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.innerRemindMessage))]
)
]
)
: _vm._e(),
ele.type === "suspend"
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("挂起原因:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.reasonMessage))]
)
]
)
: _vm._e(),
ele.type === "suspend" && ele.suspendedaReasonDict
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("挂起意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.suspendedaReasonDict))]
)
]
)
: _vm._e(),
ele.type === "refuse" && ele.refuseReasonDict
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("拒绝意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.refuseReasonDict))]
)
]
)
: _vm._e(),
(ele.type === "reject" || ele.type === "rejectNonstop") &&
ele.rejectReasonDict
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("驳回意见:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.rejectReasonDict))]
)
]
)
: _vm._e(),
ele.type === "turnToward"
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("转办原因:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.reasonMessage))]
)
]
)
: _vm._e(),
ele.type === "transfer"
? _c(
"span",
{ staticClass: "result-message__container" },
[
_vm._v("转移原因:"),
_c(
"span",
{ staticClass: "aos-flow-history__message" },
[_vm._v(_vm._s(ele.reasonMessage))]
)
]
)
: _vm._e()
])
: _vm._e(),
ele.taskFiles && ele.taskFiles.length > 0
? _c(
"div",
{
staticClass: "aos-flow-history__file",
attrs: {
id: "aos-flow-history_" + ele.id + "_" + _vm.uuid
}
},
_vm._l(ele.taskFiles, function(item, index) {
return _c(
"div",
{
key: index,
staticClass: "aos-flow-history__file-item"
},
[
_c(
"div",
{
staticClass: "aos-flow-history__file-item-body"
},
[
_vm.otherFileTypeList.indexOf(item.fileExt) > -1
? _c(
"div",
{
staticClass:
"aos-flow-history__file-item-detail"
},
[
_vm.iconList.includes(item.fileExt)
? _c("i", {
staticClass: "iconfont",
class: "icon-" + item.fileExt,
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
: _vm._e(),
item.fileExt === "docx"
? _c("i", {
staticClass: "iconfont icon-doc",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
: _vm._e(),
item.fileExt === "xlsx"
? _c("i", {
staticClass: "iconfont icon-xls",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
: _vm._e(),
item.fileExt === "pptx"
? _c("i", {
staticClass: "iconfont icon-ppt",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
: _vm._e()
]
)
: item.fileExt === "pdf"
? _c(
"div",
{
staticClass:
"aos-flow-history__file-item-detail",
on: {
click: function($event) {
_vm.handleViewPdf(item)
}
}
},
[
_c("i", {
staticClass: "iconfont icon-pdf",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
]
)
: _vm.videoFileTypeList.indexOf(
item.fileExt
) > -1
? _c(
"div",
{
staticClass:
"aos-flow-history__file-item-detail",
on: {
click: function($event) {
_vm.handleViewVideo(item)
}
}
},
[
_c("i", {
staticClass: "iconfont icon-mp4",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
]
)
: _vm.audioFileTypeList.indexOf(
item.fileExt
) > -1
? _c(
"div",
{
staticClass:
"aos-flow-history__file-item-detail",
on: {
click: function($event) {
_vm.handleViewVideo(item)
}
}
},
[
_c("i", {
staticClass: "iconfont icon-mp3",
staticStyle: {
cursor: "pointer",
"font-size": "50px"
},
attrs: {
title: item.fileName,
name: item.fileName
}
})
]
)
: _c(
"div",
{
staticClass:
"aos-flow-history__file-item-detail",
on: {
click: function($event) {
_vm.handleViewerImg(
"aos-flow-history_" +
ele.id +
"_" +
_vm.uuid
)
}
}
},
[
_c("img", {
staticStyle: { cursor: "pointer" },
attrs: {
src: item.realFileUrl,
alt: item.fileName,
name: item.fileName,
title: item.fileName
}
})
]
),
_c(
"div",
{
staticClass:
"aos-flow-history__file-item-operation"
},
[
_c(
"span",
{
staticClass:
"aos-flow-history__file-item-operation-download",
on: {
click: function($event) {
_vm.handleDownload(item)
}
}
},
[_vm._v("下载")]
)
]
)
]
),
_c(
"div",
{
staticClass: "aos-flow-history__file-item-name"
},
[
_vm._v(
_vm._s(item.fileName + "." + item.fileExt)
)
]
)
]
)
}),
0
)
: _vm._e()
])
])
})
],
2
),
_c(
"el-dialog",
{
attrs: {
title: "播放器",
visible: _vm.showVideDialog,
"append-to-body": "",
"destroy-on-close": "",
width: "30%"
},
on: {
"update:visible": function($event) {
_vm.showVideDialog = $event
},
close: _vm.handleVideoClose
}
},
[
_c(
"div",
{ staticClass: "aos-files__video" },
[
_c("aos-video", {
ref: "aos-flow-history-video",
attrs: { options: _vm.videoOptions }
})
],
1
)
]
),
_c(
"el-drawer",
{
attrs: {
title: "评论",
visible: _vm.showDrawer,
direction: "rtl",
"destroy-on-close": true,
size: "50%"
},
on: {
"update:visible": function($event) {
_vm.showDrawer = $event
}
}
},
[
_c(
"div",
{ staticClass: "aos-flow-history__drawer-add" },
[
_c("el-input", {
attrs: { placeholder: "请输入评论" },
model: {
value: _vm.appendComment,
callback: function($$v) {
_vm.appendComment = $$v
},
expression: "appendComment"
}
}),
_c(
"el-button",
{
staticStyle: { "margin-left": "5px" },
attrs: { type: "primary" },
on: { click: _vm.handleAppendComment }
},
[_vm._v("添加评论")]
)
],
1
),
_c("aos-table", {
ref: "commentTable",
attrs: {
data: _vm.commentList,
tableTemplate: _vm.commentcTableTemplate,
"show-pagination": "",
"show-setting": true,
fixedHead: false,
maxHight: 300,
currentPage: _vm.currentPage,
pageSize: _vm.pageSize,
total: _vm.total
},
on: {
"table-current-change": _vm.handleCurrentChange,
"table-size-change": _vm.handleSizeChange
}
})
],
1
)
],
1
)
}
var staticRenderFns = [
function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "icon-round" }, [
_c("i", { staticClass: "el-icon-s-check" })
])
}
]
render._withStripped = true
// CONCATENATED MODULE: ./packages/aos-flow-history/src/main.vue?vue&type=template&id=ad8426fc&
// EXTERNAL MODULE: external "lodash/cloneDeep"
var cloneDeep_ = __webpack_require__(7);
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep_);
// EXTERNAL MODULE: external "viewerjs-optimize"
var external_viewerjs_optimize_ = __webpack_require__(29);
var external_viewerjs_optimize_default = /*#__PURE__*/__webpack_require__.n(external_viewerjs_optimize_);
// CONCATENATED MODULE: ./packages/aos-flow-history/src/model/index.js
var commentcTableTemplate = {
ref: 'commentTable',
tableItem: [{
prop: 'comment',
sortable: true,
label: '评论内容'
// width: '380'
}, {
prop: 'time',
sortable: true,
label: '评论时间',
width: '180'
}, {
prop: 'userName',
sortable: true,
label: '评论人',
width: '100'
}]
};
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/aos-flow-history/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
name: "AosFlowHistory",
props: {
processInstanceId: {
type: String
},
showComment: {
type: Boolean,
default: true
},
// 是否自动从query取值,配合processInstanceId使用,
fromQuery: {
type: Boolean,
default: true
},
timeFormat: {
type: String,
default: 'hh:mm:ss',
validator: function validator(val) {
return ['hh:mm:ss', 'hh:mm', 'hh'].indexOf(val) > -1;
}
},
dateFormat: {
type: String,
default: 'yyyy-mm-dd',
validator: function validator(val) {
return ['yyyy-mm-dd', 'yyyy-MM-dd', 'yyyy-mm', 'yyyy-MM', 'yyyy'].indexOf(val) > -1;
}
}
},
computed: {},
watch: {
processInstanceId: function processInstanceId(val, oldVal) {
if (val && val !== oldVal) {
var claim = this.$utils.userSetting.getUserSettingByName('aos-flow-history');
if (!claim) {
this.isShowClaimData = true;
this.$utils.userSetting.setUserSettingByName('aos-flow-history', 'claim');
} else if (claim === 'claim') {
this.isShowClaimData = true;
} else if (claim === 'refuse') {
this.isShowClaimData = false;
}
this.getProcessInstanceId();
}
}
},
data: function data() {
return {
reverse: true,
historyDetailList: "", // 历史审批意见,
copyProcessInstanceId: "",
startEndMessage: "",
translateHistoryDetailList: [],
startEndType: ['PROCESS_STARTED', 'PROCESS_COMPLETED'],
userIdList: [],
otherFileTypeList: ['docx', 'doc', 'xls', 'zip', 'xlsx', 'rar', 'txt', 'ppt', 'pptx'],
iconList: ['bmp', 'doc', 'gif', 'mp3', 'pdf', 'ppt', 'txt', 'rar', 'xls', 'zip', 'wps', 'avi', 'mp4'],
videoFileTypeList: ['mp4', 'webm', 'mov', 'flv'],
audioFileTypeList: ['mp3', 'wav', 'ogg'],
imgFileTypeList: ['png', 'jpg', 'jpeg', 'gif', 'tif', 'bmp', 'svg', 'webp'],
showVideDialog: false,
videoOptions: {},
viewer: null,
showDrawer: false,
commentcTableTemplate: commentcTableTemplate,
commentList: [],
pageSize: 10,
currentPage: 1,
total: 0,
appendComment: '',
isShowClaimData: true,
uuid: ''
};
},
created: function created() {
this.uuid = this.$utils.getUuid();
var claim = this.$utils.userSetting.getUserSettingByName('aos-flow-history');
if (!claim) {
this.isShowClaimData = true;
this.$utils.userSetting.setUserSettingByName('aos-flow-history', 'claim');
} else if (claim === 'claim') {
this.isShowClaimData = true;
} else if (claim === 'refuse') {
this.isShowClaimData = false;
}
this.getProcessInstanceId();
},
methods: {
handleShowClaim: function handleShowClaim() {
if (this.isShowClaimData) {
this.$utils.userSetting.setUserSettingByName('aos-flow-history', 'claim');
} else {
this.$utils.userSetting.setUserSettingByName('aos-flow-history', 'refuse');
}
this.getApprovalMessage();
},
//POST /api/v2/process-comment/append 追加评论
handleAppendComment: function handleAppendComment() {
var _this = this;
if (!this.appendComment) {
this.$message.error('请输入评论内容!');
return;
}
this.$http({
url: '/bpm/api/v2/process-comment/append',
method: 'post',
data: {
comment: this.appendComment,
processInstId: this.copyProcessInstanceId
}
}).then(function () {
_this.$message({
message: '追加评论成功',
type: 'success'
});
_this.appendComment = '';
_this.getAllProcessComment();
});
},
//GET /api/v2/process-comment/get/{processInstId}获取评论
getAllProcessComment: function getAllProcessComment() {
var _this2 = this;
this.$http({
url: '/bpm/api/v2/process-comment/get-list/' + this.copyProcessInstanceId,
method: 'get',
params: {
page: this.currentPage - 1,
size: this.pageSize
}
}).then(function (resp) {
_this2.commentList = resp.data.content;
_this2.total = resp.data.totalElements;
});
},
handleSizeChange: function handleSizeChange(size) {
this.tableList = [];
this.pageSize = size;
this.currentPage = 1;
this.getAllProcessComment();
},
handleCurrentChange: function handleCurrentChange(page) {
this.tableList = [];
this.currentPage = page;
this.getAllProcessComment();
},
handleShowDrawer: function handleShowDrawer() {
this.showDrawer = true;
//this.getAllProcessComment()
},
handleDownload: function handleDownload(fileItem) {
var _this3 = this;
var fileName = fileItem.fileName + '.' + fileItem.fileExt;
this.$http({
url: fileItem.realFileUrl,
responseType: 'blob'
}).then(function (res) {
_this3.download(res.data, fileName);
});
},
download: function download(blob, name) {
var a = document.createElement('a');
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = name;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(a);
},
handleVideoClose: function handleVideoClose() {
this.$refs['aos-flow-history-video'].destory();
},
handleViewPdf: function handleViewPdf(item) {
this.$openPdfViewer(item.realFileUrl);
},
handleViewVideo: function handleViewVideo(item) {
this.showVideDialog = true;
this.videoOptions = {
width: 400,
sources: [{
src: item.realFileUrl,
type: 'video/' + item.fileExt
}]
};
},
handleViewerImg: function handleViewerImg(id) {
this.showImgViewer = true;
if (this.viewer) {
this.viewer.destroy();
this.viewer = null;
}
this.viewer = new external_viewerjs_optimize_default.a(document.getElementById(id), {
className: 'aos-img-viewer-container ' + id
});
},
handleViewImg: function handleViewImg() {
var data = this.currentFiles;
if (!data.detailChildren || data.detailChildren && data.detailChildren.length <= 0) return;
this.removeContainer(data.id);
var container = this.currentContainer;
if (this.viewer) {
this.viewer.destroy();
this.viewer = null;
}
var children = data.detailChildren;
if (!this.currentContainerId || this.currentContainerId && this.currentContainerId !== data.id) {
container = this.createImgList(children, data.id);
}
this.currentContainerId = data.id;
this.currentContainer = container;
this.viewer = new external_viewerjs_optimize_default.a(document.getElementById('aos-files-' + data.id), {
className: 'aos-img-viewer-container ' + ('aos-files-' + data.id)
});
container.children[0].click();
},
getRefLabel: function getRefLabel(refCode, paramsData, resData) {
var _this4 = this;
if (!refCode) {
this.$message({
type: 'error',
message: '参照对应的 refCode 不能为空.'
});
return;
}
return this.$optimizeHttp({
url: '/core/api/ref/translate/' + refCode,
method: 'get',
params: {
code: paramsData
}
}).then(function (res) {
var refList = cloneDeep_default()(res.data);
var refObject = {};
refList.forEach(function (item) {
refObject[item.code] = item.value;
});
resData.forEach(function (item) {
if (item.userId) {
item.userName = refObject[item.userId];
}
});
_this4.translateHistoryDetailList = resData;
}).catch(function () {
_this4.translateHistoryDetailList = resData;
});
},
arrayToObject: function arrayToObject(array) {
if (!array && !Array.isArray(array)) return {};
var object = {};
array.forEach(function (item) {
object[item.code] = item.value;
});
return object;
},
tagType: function tagType(item) {
if (item.type === 'complete') {
return 'success';
} else if (item.type === 'reject' || item.type === 'rejectNonstop') {
return 'warning';
} else if (item.type === 'refuse') {
return 'danger';
}
},
handleSortChange: function handleSortChange() {
this.translateHistoryDetailList.reverse();
},
getProcessInstanceId: function getProcessInstanceId() {
if (this.fromQuery && this.$route.query && this.$route.query.processInstanceId) {
// this.processInstanceId = this.$route.query.processInstanceId
this.copyProcessInstanceId = this.$route.query.processInstanceId;
}
if (this.processInstanceId) {
this.copyProcessInstanceId = this.processInstanceId;
}
if (this.copyProcessInstanceId) {
this.getApprovalMessage();
this.getAllProcessComment();
}
},
// getIsShowComment(){
// if (this.$route.query && this.$route.query.type) {
// this.isShowComment = false
// }else{
// this.isShowComment = true
// }
// },
// 获取审批意见
getApprovalMessage: function getApprovalMessage() {
var _this5 = this;
var filterTypes = '';
if (this.isShowClaimData) {
filterTypes = '';
} else {
filterTypes = 'claim';
}
this.$http({
method: "get",
url: "/bpm/api/v2/process-comments-auto-auth/" + this.copyProcessInstanceId,
params: { filterTypes: filterTypes }
}).then(function (res) {
var resData = res.data;
_this5.userIdList = [];
resData.forEach(function (item) {
if (item.userId) {
_this5.userIdList.push(item.userId);
}
if (item.taskFiles && item.taskFiles.length > 0) {
item.taskFiles.forEach(function (item) {
item.realFileUrl = '/bpm/api/task/file-download/' + item.taskId + '/' + item.commentId;
item.fileExt = item.fileSuffix.split('.')[1].toLowerCase();
});
}
});
_this5.translateHistoryDetailList = resData;
if (!_this5.reverse) {
_this5.translateHistoryDetailList.reverse();
}
// this.getRefLabel('user', this.userIdList.join(','), resData)
});
}
}
});
// CONCATENATED MODULE: ./packages/aos-flow-history/src/main.vue?vue&type=script&lang=js&
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./packages/aos-flow-history/src/main.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_mainvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/aos-flow-history/src/main.vue"
/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/aos-flow-history/index.js
main.install = function (Vue) {
Vue.component(main, main.name);
};
/* harmony default export */ var aos_flow_history = __webpack_exports__["default"] = (main);
/***/ }),
/***/ 29:
/***/ (function(module, exports) {
module.exports = require("viewerjs-optimize");
/***/ }),
/***/ 7:
/***/ (function(module, exports) {
module.exports = require("lodash/cloneDeep");
/***/ })
/******/ });