Commit be522b16 authored by jingnan's avatar jingnan 👀

Merge branch 'online'

parents 436a3549 444c12cd
......@@ -35,7 +35,6 @@ export default {
key: 'component.bindKey',
title: '绑定属性',
component: {
obscure: `this.form.component.bindType !== 'key'`,
defaultValue: 'id',
name: 'el-input'
}
......
......@@ -88,7 +88,7 @@ export default {
return
}
const ids = this.getIds(val)
this.getNodeDatByIdS(ids, this.initBindKey)
this.getNodeDatByIdS(ids, this.bindKey)
}
}
},
......@@ -218,12 +218,14 @@ export default {
return o && Object.prototype.toString.call(o) === '[object Object]'
},
/**
* 判断一个数据是 null, undefined, NAN, 空字符串 这些类型
* 判断一个数据是 null, undefined, NAN, 空字符串('')、空字对象({})、空数组([]) 这些类型
* @param {Any} o 要判断类型的数据
*/
isInvalidType(o) {
const type = typeof o
return type === 'undefined' || (type === 'string' && !o.trim().length) || isNaN(o) || (!o && Object.prototype.toString.call(o) === '[object Object]')
// type 的值:number、string、boolean、object、set、undefined、null
// 判断 NaN 要用 Number.isNaN(),他会不先做转数字操作,而 NaN() 会先做转数据操作
const type = Object.prototype.toString.call(o).replace(/^\[object\s+/, '').replace(/]$/, '').toLowerCase()
return [null, undefined].includes(o) || Number.isNaN(o) || (type === 'string' && !o.trim().length) || (type === 'object' && !Object.keys(o).length) || (Array.isArray(o) && !o.length)
},
// 取出绑定数据的id
getIds(val) {
......
......@@ -20,7 +20,7 @@ export default {
type: String,
default: 'String'
},
initBindKey: {
bindKey: {
type: String,
default: 'id'
},
......
......@@ -89,7 +89,14 @@ export default {
// 组件方法
methods: {
async getUseRequestTypes() {
this.options = await this.$utils.getDicListByCode('UseRequestType')
const user = localStorage.getItem('user')
const dicData = await this.$utils.getDicListByCode('UseRequestType')
// 当前登陆人为孙瑶雪 和dexadmin的时候下拉可以看到试验领用,其他人看不到
if (user === '孙瑶雪' || user === 'dexadmin') {
this.options = dicData.filter(item => item.label !== '无指令领用')
} else {
this.options = dicData.filter(item => item.label !== '试验领用' && item.label !== '无指令领用')
}
},
dataChangeHandler(val) {
if (val) {
......
......@@ -260,6 +260,7 @@ export default {
}
},
'form.airModel': {
immediate: true,
handler: function(val) {
val && this.changeSorties()
}
......@@ -1824,6 +1825,14 @@ export default {
},
// 默认带出接收仓库
defaultStorage() {
// let extDxProductAreaItem = []
// if (this.basicData.extDxProductAreaId) {
// extDxProductAreaItem = [{
// 'fieldName': 'source.extDxProductAreaId',
// 'operator': 'EQ',
// 'value': this.basicData.extDxProductAreaId || ''
// }]
// }
const params = {
'pageFrom': 1,
'pageSize': 9999,
......@@ -1840,6 +1849,7 @@ export default {
// 'operator': 'EQ',
// 'value': this.basicData.extDxProductAreaId || ''
// }
// ...extDxProductAreaItem
],
'operator': 'AND'
}
......@@ -1855,7 +1865,9 @@ export default {
const STORAGE = this.formFileds[0].data.find(
(item) => item.key === 'storageZone'
)
// if (!this.basicData.extDxProductAreaId) {
res.items.content = res.items.content.filter(item => { return item.source })
// }
STORAGE.component.options = res.items.content.map((item) => {
return {
label: item.source && item.source.extname,
......
......@@ -91,7 +91,7 @@ export default {
this.remoteFlag = false
const params = {
'pageFrom': 1,
'pageSize': 10,
'pageSize': 30,
'searchItems': {
'items': [
{
......
export default {
props: {},
layoutConfigData: [
{
title: '高级组件配置',
data: [
{
key: 'linkageAttr',
title: '联动属性',
component: {
defaultValue: '',
name: 'el-input'
}
},
{
key: 'requestMethod',
title: '请求方式',
width: 1,
component: {
name: 'el-select',
isLabelTop: true,
options: [
{
label: 'get',
value: 'get'
},
{
label: 'post',
value: 'post'
}
]
}
},
{
key: 'requestURL',
title: '请求url',
width: 1,
component: {
isLabelTop: true,
defaultValue: 'requestURL=""',
name: 'btnCodeEdit',
remindText: `requestURL为接口地址变量,直接给赋值,该变量必须有值`
}
},
{
key: 'requestParameters',
title: '请求参数',
width: 1,
component: {
isLabelTop: true,
defaultValue: 'requestParameters = {}',
name: 'btnCodeEdit',
remindText: `requestParameters为请求参数变量,直接给赋值,该变量必须有值`
}
},
{
key: 'formateResponse',
title: '接口返回数据格式化',
width: 1,
component: {
isLabelTop: true,
defaultValue: `responseData = res.items.content.map(row => {
return {
value: row.id,
label: row.name
}
})`,
name: 'btnCodeEdit',
remindText: `responseData为接口返回数据`
}
}
]
}
],
data() {
return {
}
},
created() {
},
computed: {
},
methods: {
}
}
<template>
<div class="generalLinkageSelect-select">
<el-select ref="selectCom" v-model="selVal" placeholder="请选择" size="mini" :disabled="disabledVal" @change="changeVal">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
<script>
import http from '@/utils/http'
import config from './config'
import _get from 'lodash.get'
export default {
componentName: '通用联动属性配置',
name: 'GeneralLinkageSelectSelect', // name写在组件的最前方,自定义组件为必填
components: {},
mixins: [config],
props: {
item: {
type: Object,
default: () => {
return {}
}
},
form: {
type: Object,
default: () => {}
},
middleForm: {
type: Object,
default: () => {}
},
value: {
type: [Number, String, Object],
default: () => ''
}
},
data() {
return {
options: [],
selVal: '',
disabledVal: false,
linkageValue: ''
}
},
computed: {},
watch: {
form: {
immediate: true,
deep: true,
handler(val) {
if (val) {
if (!this.item.linkageAttr) {
return
}
const _val = _get(this.form, this.item.linkageAttr)
if (_val !== this.linkageValue) {
this.options = []
this.selVal = ''
this.linkageValue = _val
this.getData(_val)
}
}
}
},
item: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
},
value: {
immediate: true,
deep: true,
handler(v) {
if (v) {
this.selVal = this.value
}
}
}
},
created() {
// 初始化数据
},
methods: {
getData(val) {
var requestURL = ''
var requestParameters = {}
if (this.item.requestURL) {
try {
let fun
eval(`fun = function (obtainedParams, functionParams){${this.item.requestURL}}`) // eslint-disable-line
fun.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
}
if (this.item.requestParameters) {
try {
let fun1
eval(`fun1 = function (obtainedParams, functionParams){${this.item.requestParameters}}`) // eslint-disable-line
fun1.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
}
http[this.item.requestMethod](requestURL, requestParameters).then(res => {
let responseData = []
if (this.item.formateResponse) {
try {
let fun2
eval(`fun2 = function (obtainedParams, functionParams){${this.item.formateResponse}}`) // eslint-disable-line
fun2.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
} else {
responseData = res.items.content.map(row => {
return {
value: row.id,
label: row.name
}
})
}
this.options = responseData
})
},
changeVal() {
this.$emit('input', this.selVal)
}
}
}
</script>
<style lang='scss'>
</style>
......@@ -120,6 +120,15 @@ export default {
handler(v) {
if (v !== this.selVal) {
this.selVal = this.value
// 解决虚拟滚动后返回界面数据展示为id/code的问题
if (!this.options.length && this.selVal && this.selVal.includes('/')) {
this.options = [{
label: this.selVal.split('/')[1],
value: this.selVal
}]
} else {
this.options = []
}
}
}
}
......@@ -133,9 +142,9 @@ export default {
beforeDestroy() {
// 在组件销毁之前做一些清理工作
// 清除定时器、取消订阅等
sessionStorage.setItem('InStorageMoveform-InStorageMoveTable', '')
this.selVal = null
this.options = []
// sessionStorage.setItem('InStorageMoveform-InStorageMoveTable', '')
// this.selVal = null
// this.options = []
},
methods: {
changeVal() {
......@@ -160,6 +169,11 @@ export default {
},
// 远程搜索物料类别
remoteMethod(query) {
this.stopLoading = false
this.pageData = {// 懒加载相关参数,这里代表从第一条数据开始加载,一次加载二十项
pageNumber: 1,
pageSize: 10
}
if (sessionStorage.getItem('InStorageMoveform-InStorageMoveTable')) {
this.linkageValue = sessionStorage.getItem('InStorageMoveform-InStorageMoveTable')
}
......@@ -180,14 +194,15 @@ export default {
// 有内容则搜索
if (query !== '') {
querys.searchItems.items.push({ 'fieldName': 'extcode', operator: 'LIKE', value: query })
} else {
// 重置懒加载
this.stopLoading = false
this.pageData = {// 懒加载相关参数,这里代表从第一条数据开始加载,一次加载二十项
pageNumber: 1,
pageSize: 10
}
}
// else {
// // 重置懒加载
// this.stopLoading = false
// this.pageData = {// 懒加载相关参数,这里代表从第一条数据开始加载,一次加载二十项
// pageNumber: 1,
// pageSize: 10
// }
// }
// 调用接口
this.selectLoading = true
this.getdata(querys)
......
......@@ -871,7 +871,10 @@ export default {
'extDxProductAreaId': this.form.extDxProductAreaId,
'extDxSipplierId': this.form.extDxSipplierId,
'materialTypeId': this.form.materialTypeId,
'inStorageRequestItems': tableData
'inStorageRequestItems': tableData && tableData.map(r => {
delete r.objOrg
return r
}) || []
}
if (paramOperator === 'MODIFY') {
param.id = this.newDataImportResId || this.form.id
......
......@@ -44,11 +44,14 @@ export default {
},
computed: {
resultData() {
return this.basicData.inventory.map(item => {
const items = this.basicData.inventory.map(item => {
item.inWorkCenter = 'Y'
item.currExtWorkUnitId = null
item.currOutsideAmount = null
item.currDisposeDes = null
return item
}
)
})
return JSON.parse(JSON.stringify(items))
}
},
watch: {
......@@ -62,7 +65,7 @@ export default {
}
const extWorkCenterId = this.$refs.inStorageMoveform.$refs.asCom.form.extWorkCenterId
const params = this.basicData.inventory.map(item => {
const params = this.resultData.map(item => {
return {
inventoryId: item.id,
extWorkCenterId: extWorkCenterId,
......
export default {
props: {},
layoutConfigData: [
{
title: '高级组件配置',
data: [
{
key: 'bindValue',
title: '绑定属性',
component: {
defaultValue: '',
name: 'el-input'
}
}
]
}
],
data() {
return {
}
},
created() {
},
computed: {
},
methods: {
}
}
<template>
<div class="problemProgressCom">
<el-form ref="form" class="processForm" :inline="true" :model="formData" label-width="40px">
<el-row v-for="(item, index) in resultFormData" :key="index">
<el-col :span="5">
<el-form-item
label="日期"
:prop="'progresss.' + index + '.progressTime'"
>
<!-- :rules="{
required: true, message: '该项必填', trigger: 'blur'
}" -->
<el-date-picker
v-model="item.progressTime"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"
/>
</el-form-item>
</el-col>
<el-col :span="17">
<el-form-item
label="答复"
:prop="'progresss.' + index + '.progressItem'"
class="textareaItem"
>
<!-- :rules="[
{required: true, message: '该项必填', trigger: 'blur'},
]" -->
<el-input v-model="item.progressItem" autosize type="textarea" size="small" @change="changeVal" />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item class="btn-box">
<span v-if="index+1 == resultFormData.length" class="btn-item" title="新增" @click="addItem" @change="changeVal">
<img src="/icons/c-add.png" alt="">
</span>
<span v-if="index !== 0" class="btn-item" title="删除" @click="deleteItem(item,index)">
<img src="/icons/c-creatbackups.png" alt="">
</span>
</el-form-item>
</el-col>
</el-row></el-form>
</div>
</template>
<script>
import config from './config'
import moment from 'moment'
export default {
componentName: '问题进展',
name: 'ProblemProgressCom', // name写在组件的最前方,自定义组件为必填
components: {},
mixins: [config],
props: {
itemObj: {
type: Object,
default: null
},
form: {
type: Object,
default: () => {}
},
middleForm: {
type: Object,
default: () => {}
},
value: {
type: [Number, String, Object, Array],
default: () => ''
}
},
data() {
return {
formData: {
progresss: [
{
progressTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
progressItem: '',
operator: 'ADD'
}
]
}
}
},
computed: {
resultFormData() {
return this.formData.progresss.filter(item => item.operator !== 'REMOVE')
}
},
watch: {
value: {
immediate: true,
deep: true,
handler(v) {
if (v) {
this.$set(this.formData, 'progresss', this.value.map(item => {
if (!item.operator) {
if (item.id) {
item.operator = 'MODIFY'
} else {
item.operator = 'ADD'
}
}
return item
}))
}
}
}
},
created() {
// 初始化数据
},
methods: {
addItem() {
this.formData.progresss.push({
progressTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
progressItem: '',
operator: 'ADD'
})
this.changeVal()
},
deleteItem(item, index) {
item.operator = 'REMOVE'
this.changeVal()
},
changeVal() {
this.$emit('input', this.formData.progresss)
}
}
}
</script>
<style lang='scss'>
.problemProgressCom{
.processForm{
width: 100%;
.el-form-item{
width: 100%;
.el-form-item__content{
width: calc(100% - 50px);
}
}
.btn-box{
width: 100%;
height: 100%;
margin-bottom: 0px;
.el-form-item__content{
width: 100%;
}
.btn-item {
display: inline-block;
padding: 4px;
width: 16px;
height: 16px;
img{
height: 100%;
width: 100%;
}
// line-height: 16px;
}
}
}
}
</style>
......@@ -951,7 +951,10 @@ export default {
'extDxProductAreaId': this.form.extDxProductAreaId,
'extDxSipplierId': this.form.extDxSipplierId,
'materialTypeId': this.form.materialTypeId,
'inStorageRequestItems': tableData
'inStorageRequestItems': tableData && tableData.map(r => {
delete r.objOrg
return r
}) || []
}
if (paramOperator === 'MODIFY') {
param.id = this.newDataImportResId || this.form.id
......
......@@ -77,7 +77,7 @@ export default {
this.tableColumnSelect = true
const params = {
'pageFrom': 1,
'pageSize': 10,
'pageSize': 30,
'searchItems': {
'children': [
{
......
export default {
props: {},
layoutConfigData: [
{
title: '高级组件配置',
data: [
{
key: 'bindKey',
title: '绑定属性',
disabled: true,
component: {
defaultValue: 'positionNumber',
name: 'el-input'
}
},
{
key: 'relatedAttribute',
title: '受关联属性',
disabled: true,
component: {
defaultValue: '',
name: 'el-input'
}
}
]
}
],
data() {
return {
}
},
created() {
},
computed: {
},
methods: {
}
}
<template>
<div>
<el-select
:value="value"
:value="selVal"
:loading="loading"
filterable
remote
......@@ -22,10 +22,11 @@
</template>
<script>
import config from './config'
export default {
name: 'StationSelect',
componentName: '架次关联站位编号',
mixins: [config],
props: {
value: {
type: [String, Number],
......@@ -47,20 +48,35 @@ export default {
data() {
return {
loading: false,
options: []
options: [],
// linkageValue: '',
selVal: ''
}
},
computed: {},
watch: {
'form.sorties': {
immediate: true,
deep: true,
// deep: true,
handler(val) {
// if (val !== this.linkageValue) {
if (this.item.key !== 'position') {
// this.linkageValue = val
this.$set(this.form, 'positionNumber', '')
this.selVal = ''
}
// }
val && this.getOptions()
}
},
value: {
immediate: true,
deep: true,
handler(v) {
if (v) {
this.selVal = this.value
}
}
}
},
methods: {
......@@ -104,6 +120,15 @@ export default {
},
change(val) {
this.$emit('input', val)
this.clearRelativeAttr()
},
clearRelativeAttr() {
if (this.item.relatedAttribute) {
const attributes = this.item.relatedAttribute.split(',') || []
attributes.forEach(el => {
el && this.$set(this.form, el, '')
})
}
},
clear() {
this.$emit('input')
......
......@@ -96,7 +96,7 @@ export default {
this.tableColumnSelect = true
const params = {
'pageFrom': 1,
'pageSize': 10,
'pageSize': 30,
'searchItems': {
'children': [
{
......
......@@ -190,6 +190,7 @@ export default {
this.dialogVisible = false
})
} else {
this.setPersonVisible = false
this.$utils.showMessageWarning('退库原因为退库单退库的领用退库和配套退库不能一起提交')
}
})
......@@ -199,10 +200,12 @@ export default {
this.$refs.applyTable.$refs.asCom.getData()
}).catch(err => {
this.$utils.showMessageWarning('出现异常,提交失败')
console.log(err)
}).finally(() => {
this.dialogVisible = false
})
} else {
this.dialogVisible = false
this.$utils.showMessageWarning('退库原因为退库单退库的不能与其他退库类型一起提交')
}
},
......@@ -214,6 +217,7 @@ export default {
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => item.inStorageRequestItems.forEach(i => ids.push(i.id)))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/InStorageRequestItem/creator/apply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
......@@ -227,6 +231,9 @@ export default {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择工艺员')
}
},
setPersonCancle() {
this.setPersonVisible = false
......
......@@ -25,5 +25,6 @@ function downloadFile(url, type, params, userAction) {
function downloadZip(url, type) {
return http.downloadZip(url, type)
}
export default { get, post, put, del, patch, downloadFile, downloadZip }
export { get, post, put, del, patch, downloadFile, downloadZip }
......@@ -12,7 +12,7 @@
ref="form"
class="AlodinDeploysCard-form"
:model="form"
label-width="100px"
label-width="110px"
:rules="rules"
>
<el-row style="margin-bottom: 10px">
......@@ -120,12 +120,11 @@
/>
</el-form-item>
</el-row>
<el-row>
<!-- <el-row>
<el-form-item label="站位长/站位计划员/站位工程师" prop="receiver" label-width="250px">
<!-- <DxUserSelect /> -->
<GeneralUserSelect v-model="form.receiver" :item="{multiple:true}" />
</el-form-item>
</el-row>
</el-row> -->
</el-form>
<span slot="footer" class="dialog-footer">
<el-button
......@@ -182,6 +181,9 @@ export default {
sptype: [
{ required: true, message: '请选择问题类型', trigger: 'change' }
],
tfpause: [
{ required: true, message: '请选择是否加工暂停', trigger: 'change' }
],
receiver: [
{ required: true, message: '请选择站位长/站位计划员/站位工程师', trigger: 'change' }
]
......@@ -327,10 +329,10 @@ export default {
res.forEach(item => {
result.push({ operator: 'ADD', target: item })
})
var receiver = ''
this.form.receiver.forEach((item, i) => {
receiver += (item + (this.form.receiver.length - 1 > i ? ',' : ''))
})
// var receiver = ''
// this.form.receiver.forEach((item, i) => {
// receiver += (item + (this.form.receiver.length - 1 > i ? ',' : ''))
// })
const params = {
operator: 'ADD',
subTypeName: 'SpotProblem',
......@@ -347,8 +349,9 @@ export default {
airModel: this.form.airModel,
sorties: this.form.sorties,
standPosition: this.form.standPosition,
receiver: receiver,
objFileLinks: result
// receiver: receiver,
objFileLinks: result,
opener: true
}
post('/SpotProblem/recursion', params)
......
......@@ -43,14 +43,34 @@ export default {
getDetail() {
msgDetail(this.id).then(res => {
this.message = res.items
res.items.templateId && this.getTemplate(res.items.templateId)
if (res.items.templateId) {
this.getTemplate(res.items.templateId)
} else {
this.showObjFlag = true
}
})
},
getTemplate(id) {
getTemplateDetail(id).then(res => {
this.showObjFlag = res.items.showObjFlag
this.showObjFlag = res.items ? res.items.showObjFlag : true
const businessObject = JSON.parse(this.message.businessObject)
this.taskTitle = `${businessObject.subTypeDisplayName}-${businessObject.number} ${businessObject.name} ${businessObject.displayVersion}`
const taskTitle = []
this.taskTitle = ''
if (businessObject.number) {
taskTitle.push(businessObject.number)
}
if (businessObject.name) {
taskTitle.push(businessObject.name)
}
if (businessObject.displayVersion) {
taskTitle.push(businessObject.displayVersion)
}
if (businessObject.subTypeDisplayName) {
this.taskTitle = `${businessObject.subTypeDisplayName}-`
}
if (taskTitle.length > 0) {
this.taskTitle += taskTitle.join(' ')
}
})
},
goDetail() {
......
......@@ -7,16 +7,13 @@
<div v-dee-loading="loading" class="task-detail-process-common-com">
<div class="name">
<div class="message-popper-flow">
<div>
<div v-if="processInstanceId">
<div
v-for="(pitem, id) in historyInfo"
:key="id"
class="program-item"
>
<div class="program-left">
<!-- <div class="program-left-content">
<div>{{ pitem.completed?'已完成':'待完成' }}</div>
</div> -->
<div v-show="pitem.endTime" class="program-circle-finished" />
<div v-show="!pitem.endTime" class="program-circle-unfinished" />
</div>
......@@ -37,7 +34,7 @@
</div>
</div>
</div>
<!-- <div v-else style="line-height: 88px;text-align: center">暂无数据</div> -->
<div v-else style="line-height: 88px;text-align: center">暂无审签历史记录</div>
</div>
</div>
</div>
......@@ -57,7 +54,7 @@ export default {
},
data() {
return {
loading: true,
loading: false,
item: {},
historyInfo: [],
businessObject: {}
......@@ -78,14 +75,13 @@ export default {
processInstanceId: {
handler: function(val) {
this.$nextTick(function() {
this.getDetail(val)
val && this.getDetail(val)
})
},
immediate: true
}
},
created() {
// this.getDetail('678df986-9c26-11eb-9fc3-fa163ee7db6d')
},
methods: {
handleClose() {
......
......@@ -11,7 +11,10 @@
<!-- 左侧 -->
<div class="Left-pane">
<div v-for="(item, i) in cardList" :key="i" class="card" :class="item.title===activeTitle?'dee-active-card':''" @click="handClick(item.title)">
<div class="icon">
<el-badge v-if="item.title==='我的消息'&&messageInfo.unReadCount" :value="messageInfo.unReadCount" class="item">
<img :src="item.icon" alt="Icon">
</el-badge>
<div v-else class="icon">
<img :src="item.icon" alt="Icon">
</div>
<div class="title">
......@@ -27,7 +30,7 @@
@tabClick="tabClick"
>
<div :slot="activeTitle" style="height: 100%;">
<MyTask ref="myTask" />
<MyTask v-if="activeTitle!=='我的消息'" ref="myTask" />
</div>
<div slot="批量签审" style="height: 100%;">
<module-task-list ref="moduleTaskList" @goModuleTaskDetail="getTaskDetail" />
......@@ -77,8 +80,10 @@ import ApplyApp from './compontents/apply-app.vue'
import PersonalAssistant from './compontents/personal-assistant.vue'
import RightCenterPaneTop from './compontents/rightCenterPaneTop.vue'
import RightCenterPaneBottom from './compontents/rightCenterPaneBottom.vue'
import { get } from '@/utils/http'
export default {
name: 'NewHome',
components: { MyTask, ModuleTaskList, ApplyApp, PersonalAssistant, RightCenterPaneTop, RightCenterPaneBottom },
data() {
return {
......@@ -90,6 +95,10 @@ export default {
{
icon: '/icons/home/已办任务.png',
title: '已办任务'
},
{
icon: '/icons/home/message-icon.png',
title: '我的消息'
}
],
materialLists: [
......@@ -101,7 +110,8 @@ export default {
],
activeTitle: '我的待办',
userInfo: localStorage.getItem('user')
userInfo: localStorage.getItem('user'),
messageInfo: {}
}
},
computed: {
......@@ -115,6 +125,7 @@ export default {
watch: {},
created() {
// 初始化数据
this.getMessageInfo()
},
mounted() {
this.tabClick({ label: '单个签审' })
......@@ -134,6 +145,20 @@ export default {
this.$nextTick(() => {
if (title === '已办任务') {
this.$refs.myTask.getTasks(1, this.activeTitle)
} else if (title === '我的消息') {
this.$router.push({
path: `/dee-message/message/home`,
query: {
title: '我的消息'
}
})
this.$store.dispatch('menu/activeModel', {
appId: 'myMessage',
pageInfo: {
path: '/dee-message/message/home'
}
})
} else {
this.tabClick({ label: '单个签审' })
}
......@@ -146,6 +171,16 @@ export default {
path: `/task-detail-${this.id}`,
query: { id: this.id, insId: this.processInstanceId, title: this.title, showMenu: false }
})
},
getMessageInfo() {
const params = {
receiver: localStorage.getItem('userId')
}
get(`/Notify/findIsReadNum`, params).then(res => {
this.messageInfo = {
unReadCount: res.items.unReadCount
}
})
}
}
}
......
......@@ -187,6 +187,7 @@ export default {
this.dialogVisible = false
})
} else {
this.setPersonVisible = false
this.$utils.showMessageWarning('退库原因为退库单退库的领用退库和配套退库不能一起提交')
}
})
......@@ -200,6 +201,7 @@ export default {
this.dialogVisible = false
})
} else {
this.dialogVisible = false
this.$utils.showMessageWarning('退库原因为退库单退库的不能与其他退库类型一起提交')
}
},
......@@ -208,10 +210,10 @@ export default {
},
setPersonConfirm() {
let ids = []
console.log(this.selectionRows)
if (this.selectionRows && this.selectionRows.length) {
ids = this.selectionRows.map(item => item.processTaskId)
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/InStorageRequestItem/creator/applyByItems?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
this.$refs.applyTable.$refs.asCom.getData()
......@@ -222,6 +224,9 @@ export default {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择工艺员')
}
},
setPersonCancle() {
this.setPersonVisible = false
......
......@@ -436,6 +436,7 @@ export default {
.then((res) => {
if (res.message.includes('成功')) {
this.$bus.$emit('getPositionData')
this.getTableData()
// this.$parent.$refs.left.$refs.tree.getTreeData()
this.$message({
showClose: true,
......@@ -473,6 +474,7 @@ export default {
.then((res) => {
if (res.message.includes('成功')) {
this.$bus.$emit('getPositionData')
this.getTableData()
this.$message({
showClose: true,
message: res.message,
......@@ -509,6 +511,7 @@ export default {
.then((res) => {
if (res.message.includes('成功')) {
this.$bus.$emit('getPositionData')
this.getTableData()
this.$message({
showClose: true,
message: res.message,
......
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