82 changed files with 2438 additions and 1514 deletions
-
2config/dev.env.js
-
6config/index.js
-
6config/prod.env.js
-
6config/sit.env.js
-
7src/api/branch.js
-
3src/api/login.js
-
3src/api/mdp/arc/imageCategory.js
-
208src/api/mdp/sys/branch.js
-
4src/api/mdp/sys/order.js
-
4src/api/mdp/sys/post/deptPost.js
-
3src/api/mdp/sys/post/deptPostUser.js
-
3src/api/mdp/sys/role.js
-
25src/api/mdp/sys/user.js
-
11src/common/config.js
-
8src/common/js/util.js
-
1src/components/Image/ShearSelectUpload.vue
-
20src/components/ModulesMenu/allMenus.vue
-
89src/components/ModulesMenu/modulesOfRouter.js
-
15src/components/NoticeMsgBar/index.vue
-
2src/components/Tinymce/index.vue
-
5src/components/TopModules/index.vue
-
9src/lang/index.js
-
2src/mock/index.js
-
4src/permission.js
-
51src/router/index.js
-
58src/router/routes_order.js
-
3src/router/routes_workflow.js
-
3src/store/getters.js
-
2src/store/index.js
-
4src/store/modules/user.js
-
1src/styles/sidebar.scss
-
9src/styles/variables.scss
-
2src/views/example/table/treeTable/customTreeTable.vue
-
4src/views/layout/components/Navbar.vue
-
65src/views/layout/components/Sidebar/SidebarItem.vue
-
59src/views/layout/components/UserInfo.vue
-
20src/views/login/components/login.vue
-
54src/views/login/components/register.vue
-
20src/views/login/resetPassword.vue
-
10src/views/mdp/arc/archiveAttachment/AttachmentUpload.vue
-
14src/views/mdp/arc/category/CategoryTree.vue
-
8src/views/mdp/form/formData/FormDataMng.vue
-
8src/views/mdp/form/formDef/FormDefMng.vue
-
365src/views/mdp/meta/item/ItemAdd.vue
-
453src/views/mdp/meta/item/ItemEdit.vue
-
255src/views/mdp/meta/item/ItemMng.vue
-
11src/views/mdp/meta/itemOption/ItemOptionAdd.vue
-
8src/views/mdp/meta/itemOption/ItemOptionEdit.vue
-
68src/views/mdp/meta/itemOption/ItemOptionMng.vue
-
255src/views/mdp/meta/sysParam/SysParamMng.vue
-
6src/views/mdp/sys/branch/BranchSelect.vue
-
202src/views/mdp/sys/dept/DeptTree.vue
-
32src/views/mdp/sys/post/PostSelectCommon.vue
-
350src/views/mdp/sys/user/UsersSelect.vue
-
140src/views/mdp/sys/userDept/UserDeptEdit.vue
-
8src/views/mdp/workflow/hi/procinst/ProcinstMng.vue
-
8src/views/mdp/workflow/re/procdef/ProcdefListForParames.vue
-
2src/views/mdp/workflow/re/procdef/ProcdefListForSimpleStart.vue
-
8src/views/mdp/workflow/re/procdef/ProcdefListForStart.vue
-
8src/views/mdp/workflow/re/procdef/ProcdefMng.vue
-
8src/views/mdp/workflow/re/procdef/ProcdefSuspend.vue
-
6src/views/mdp/workflow/re/procdefParames/ProcdefParamesSet.vue
-
8src/views/mdp/workflow/ru/execution/ExecutionMng.vue
-
8src/views/mdp/workflow/ru/execution/ExecutionMngForFormData.vue
-
6src/views/mdp/workflow/ru/procinstParames/ProcinstNodeInfoSet.vue
-
22src/views/mdp/workflow/ru/procinstParames/ProcinstParamesExecutionSet.vue
-
6src/views/mdp/workflow/ru/procinstParames/ProcinstParamesStartSet.vue
-
8src/views/mdp/workflow/ru/task/TaskMng.vue
-
24src/views/mdp/workflow/ru/task/candidate/TaskCandidateSet.vue
-
1src/views/myWork/message/index.scss
-
63src/views/myWork/message/index.vue
-
2src/views/myWork/my/components/moduleSet.vue
-
32src/views/myWork/my/index.vue
-
6src/views/myWork/set/ChangeEmailStepOne.vue
-
2src/views/myWork/set/ChangeEmailStepTwo.vue
-
51src/views/myWork/set/index.vue
-
44src/views/order/createOrder.vue
-
92src/views/order/enterprise.vue
-
2src/views/order/flagShip.vue
-
48src/views/order/index.scss
-
29src/views/order/index.vue
@ -1,5 +1,7 @@ |
|||||
module.exports = { |
module.exports = { |
||||
NODE_ENV: '"production"', |
NODE_ENV: '"production"', |
||||
ENV_CONFIG: '"prod"', |
|
||||
BASE_API: '"https://www.qingqinkj.com/api"' |
|
||||
|
ENV_CONFIG: '"prod"',//环境版本号 如npm run build:${ENV_CONFIG},建议与spring.profiles.active=${ENV_CONFIG}一一对应
|
||||
|
VERSION: '"m1"',//产品版本号,nginx中通过此版本号导航到不同的静态资源目录,请求路径中用法如下:静态页面url=${DOMAIN}/${CONTEXT}/${VERSION}/#/{router.path}?${queryString}
|
||||
|
CONTEXT:'"xm"',//对应spring中的server.context-path
|
||||
|
BASE_API: '"api"'//api访问的统一入口,最后形成的apiUrl=${BASE_API}/${VERSION}/${spring.application.name}/${CONTEXT}/${ctrlUrl}
|
||||
} |
} |
||||
@ -1,5 +1,7 @@ |
|||||
module.exports = { |
module.exports = { |
||||
NODE_ENV: '"production"', |
NODE_ENV: '"production"', |
||||
ENV_CONFIG: '"sit"', |
|
||||
BASE_API: '"https://api-sit"' |
|
||||
|
ENV_CONFIG: '"sit"',//环境版本号 如npm run build:${ENV_CONFIG},建议与spring.profiles.active=${ENV_CONFIG}一一对应
|
||||
|
VERSION: '"m1"',//产品版本号,nginx中通过此版本号导航到不同的静态资源目录,请求路径中用法如下:静态页面url=${DOMAIN}/${CONTEXT}/${VERSION}/#/{router.path}?${queryString}
|
||||
|
CONTEXT:'"xm"',//对应spring中的server.context-path
|
||||
|
BASE_API: '"api"'//api访问的统一入口,最后形成的apiUrl=${BASE_API}/${VERSION}/${spring.application.name}/${CONTEXT}/${ctrlUrl}
|
||||
} |
} |
||||
@ -1,119 +1,128 @@ |
|||||
|
|
||||
export const modulesOfRouter = [ |
export const modulesOfRouter = [ |
||||
{ |
{ |
||||
id: 'mall', |
id: 'mall', |
||||
path: 'https://www.qingqinkj.com/mallm/m1/#/dashboard', |
|
||||
type: 'link' |
|
||||
|
path: '/dashboard', |
||||
|
context:'mallm', |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'mall-marketing', |
id: 'mall-marketing', |
||||
path: 'https://www.qingqinkj.com/mk/m1/#/dashboard', |
|
||||
type: 'link' |
|
||||
|
path: '/dashboard', |
||||
|
context:'mallm', |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'mdp-arc', |
id: 'mdp-arc', |
||||
path: 'https://www.qingqinkj.com/arc/m1/#/dashboard', |
|
||||
type: 'link' |
|
||||
|
path: '/dashboard', |
||||
|
context: 'arc' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'mdp-sys', |
id: 'mdp-sys', |
||||
path: 'https://www.qingqinkj.com/sys/m1/#/mdp/sys/dept/DeptMng', |
|
||||
type: 'link' |
|
||||
|
path: '/mdp/sys/dept/DeptMng', |
||||
|
context: 'sys' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-asset', |
id: 'oa-asset', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/erp/ass/assetDetail/AssetDetailMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/erp/ass/assetDetail/AssetDetailMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-attendance', |
id: 'oa-attendance', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/kq/attendance/AttendanceMonth', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/kq/attendance/AttendanceMonth', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-car', |
id: 'oa-car', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/car/components/watch', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/car/components/watch', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-contract', |
id: 'oa-contract', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/ht/contractCard/ContractCardMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/ht/contractCard/ContractCardMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-customer', |
id: 'oa-customer', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/crm/customer/CustomerIndex', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/crm/customer/CustomerIndex', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-file', |
id: 'oa-file', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/hr/user/employeeInfo', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/hr/user/employeeInfo', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-finance', |
id: 'oa-finance', |
||||
path: 'https://www.qingqinkj.com/ac/m1/#/dashboard', |
|
||||
type: 'link' |
|
||||
|
path: '/dashboard', |
||||
|
context: 'ac' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-meeting', |
id: 'oa-meeting', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/meet/meetMeeting/MeetMeetingMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/meet/meetMeeting/MeetMeetingMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-office', |
id: 'oa-office', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/om/omAppliance/OmApplianceMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/om/omAppliance/OmApplianceMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-performance', |
id: 'oa-performance', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/jx/AssesssSatistical', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/jx/AssesssSatistical', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-schedule', |
id: 'oa-schedule', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/rc/rcSchedule/RcScheduleMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/rc/rcSchedule/RcScheduleMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-seal', |
id: 'oa-seal', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/sig/sigSignet/SigSignetMng', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/sig/sigSignet/SigSignetMng', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'oa-supervision', |
id: 'oa-supervision', |
||||
path: 'https://www.qingqinkj.com/oa/m1/#/oa/duban/dubanItem/DutyDubanItem', |
|
||||
type: 'link' |
|
||||
|
path: '/oa/duban/dubanItem/DutyDubanItem', |
||||
|
context: 'oa' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-analysis', |
id: 'xm-analysis', |
||||
path: 'xm/rpt/reportIndex', |
|
||||
|
path: '/xm/rpt/reportIndex', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-development', |
id: 'xm-development', |
||||
path: '' |
|
||||
|
path: '', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-pipeline', |
id: 'xm-pipeline', |
||||
path: '' |
|
||||
|
path: '', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-product', |
id: 'xm-product', |
||||
path: '/xm/core/xmProduct/XmProductAllMng' |
|
||||
|
path: '/xm/core/xmProduct/XmProductAllMng', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-project', |
id: 'xm-project', |
||||
path: '/xm/core/xmProject/XmProjectAllMng' |
|
||||
|
path: '/xm/core/xmProject/XmProjectAllMng', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-test', |
id: 'xm-test', |
||||
path: '/xm/core/xmQuestion/XmQuestionAdd' |
|
||||
|
path: '/xm/core/xmQuestion/XmQuestionAdd', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-workload', |
id: 'xm-workload', |
||||
path: '/xm/core/xmTaskWorkload/XmTaskWorkloadInfoMy', |
path: '/xm/core/xmTaskWorkload/XmTaskWorkloadInfoMy', |
||||
|
context: 'xm' |
||||
}, |
}, |
||||
{ |
{ |
||||
id: 'xm-crowd', |
id: 'xm-crowd', |
||||
path: '/xm/core/crowd/XmTaskCrowdMng', |
path: '/xm/core/crowd/XmTaskCrowdMng', |
||||
|
context: 'xm' |
||||
} |
} |
||||
] |
] |
||||
@ -1,277 +1,38 @@ |
|||||
<template> |
<template> |
||||
<section> |
|
||||
<el-row> |
|
||||
<sticky :className="'sub-navbar draft'"> |
|
||||
<el-input v-model="addForm.id" v-loading="load.add" @keyup.enter.native="addSubmit" style="width: 40%;" placeholder="输入参数代码(英文)按回车快速添加参数"></el-input> |
|
||||
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询"></el-input> |
|
||||
<el-button type="primary" v-loading="load.list" v-on:click="searchItemOptions">查询</el-button> |
|
||||
<el-button type="primary" @click="showAdd">+参数</el-button> |
|
||||
<el-button type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0">批量删除</el-button> |
|
||||
</sticky> |
|
||||
<el-row class="page-container border"> |
|
||||
<!--列表 ItemOption 数据项取值列表--> |
|
||||
<el-table :data="itemOptions" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;"> |
|
||||
<el-table-column type="selection" width="55"></el-table-column> |
|
||||
<el-table-column prop="seqOrder" label="顺序" min-width="80" ></el-table-column> |
|
||||
<el-table-column prop="id" label="参数代码" min-width="80" ></el-table-column> |
|
||||
<el-table-column prop="optionValue" label="参数值" min-width="80" ></el-table-column> |
|
||||
<el-table-column prop="optionName" label="参数名称" min-width="80" ></el-table-column> |
|
||||
<el-table-column prop="isShow" label="是否有效" width="80" > |
|
||||
<template slot-scope="scope"> |
|
||||
<el-tag v-if="scope.row.isShow=='1'">√</el-tag> |
|
||||
<el-tag v-else>×</el-tag> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="fp" label="扩展字段" min-width="80" ></el-table-column> |
|
||||
<el-table-column label="操作" width="150" fixed="right"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="showEdit( scope.row,scope.$index)">改</el-button> |
|
||||
<el-button type="danger" @click="handleDel(scope.row,scope.$index)">删</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> |
|
||||
</el-row> |
|
||||
<!--编辑 ItemOption 数据项取值列表界面--> |
|
||||
<el-dialog title="编辑参数" :visible.sync="editFormVisible" width="50%" :close-on-click-modal="false"> |
|
||||
<item-option-edit :item-option="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></item-option-edit> |
|
||||
</el-dialog> |
|
||||
|
|
||||
<!--新增 ItemOption 数据项取值列表界面--> |
|
||||
<el-dialog title="新增参数" :visible.sync="addFormVisible" width="50%" :close-on-click-modal="false"> |
|
||||
<item-option-add :item-option="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></item-option-add> |
|
||||
</el-dialog> |
|
||||
</el-row> |
|
||||
</section> |
|
||||
|
<section> |
||||
|
<item-mng :category-id="'sysParam'"> |
||||
|
</item-mng> |
||||
|
</section> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import util from '@/common/js/util';//全局公共库 |
import util from '@/common/js/util';//全局公共库 |
||||
import Sticky from '@/components/Sticky' // 粘性header组件 |
|
||||
import { listItemOption, delItemOption, batchDelItemOption, addItemOption,listItemOptionByItemCode } from '@/api/mdp/meta/itemOption'; |
|
||||
import ItemOptionAdd from './ItemOptionAdd';//新增界面 |
|
||||
import ItemOptionEdit from './ItemOptionEdit';//修改界面 |
|
||||
|
import config from '@/common/config';//全局公共库 |
||||
import { mapGetters } from 'vuex' |
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import ItemMng from '../item/ItemMng.vue'; |
||||
export default { |
export default { |
||||
|
|
||||
computed: { |
|
||||
|
computed: { |
||||
...mapGetters([ |
...mapGetters([ |
||||
'userInfo' |
'userInfo' |
||||
]) |
]) |
||||
}, |
}, |
||||
data() { |
data() { |
||||
return { |
return { |
||||
filters: { |
|
||||
key: '' |
|
||||
}, |
|
||||
itemOptions: [],//查询结果 |
|
||||
pageInfo:{//分页数据 |
|
||||
total:0,//服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算。 |
|
||||
pageSize:10,//每页数据 |
|
||||
pageNum:1,//当前页码、从1开始计算 |
|
||||
orderFields:[],//排序列 如 ['sex','student_id'],必须为数据库字段 |
|
||||
orderDirs:[]//升序 asc,降序desc 如 性别 升序、学生编号降序 ['asc','desc'] |
|
||||
}, |
|
||||
load:{ list: false, edit: false, del: false, add: false },//查询中... |
|
||||
sels: [],//列表选中数据 |
|
||||
options:{},//下拉选择框的所有静态数据 options.sex,options.project |
|
||||
|
|
||||
addFormVisible: false,//新增itemOption界面是否显示 |
|
||||
//新增itemOption界面初始化数据 |
|
||||
addForm: { |
|
||||
itemId:'',id:'',optionValue:'',optionName:'',keys:'',isShow:'1',seqOrder:'',fp:'',tp:'',sp:'',isDefault:'',cdate:'',branchId:'',deptid:'' |
|
||||
}, |
|
||||
|
|
||||
editFormVisible: false,//编辑界面是否显示 |
|
||||
//编辑itemOption界面初始化数据 |
|
||||
editForm: { |
|
||||
itemId:'',id:'',optionValue:'',optionName:'',keys:'',isShow:'1',seqOrder:'',fp:'',tp:'',sp:'',isDefault:'',cdate:'',branchId:'',deptid:'' |
|
||||
}, |
|
||||
/**begin 自定义属性请在下面加 请加备注**/ |
|
||||
item:{id:'sysParamList',itemName:'系统参数'}, |
|
||||
/**end 自定义属性请在上面加 请加备注**/ |
|
||||
} |
} |
||||
},//end data |
},//end data |
||||
methods: { |
methods: { |
||||
handleSizeChange(pageSize) { |
|
||||
this.pageInfo.pageSize=pageSize; |
|
||||
this.pageInfo.count=true; |
|
||||
|
|
||||
this.getItemOptions(); |
|
||||
}, |
|
||||
handleCurrentChange(pageNum) { |
|
||||
this.pageInfo.pageNum = pageNum; |
|
||||
this.getItemOptions(); |
|
||||
}, |
|
||||
// 表格排序 obj.order=ascending/descending,需转化为 asc/desc ; obj.prop=表格中的排序字段,字段驼峰命名 |
|
||||
sortChange( obj ){ |
|
||||
var dir='asc'; |
|
||||
if(obj.order=='ascending'){ |
|
||||
dir='asc' |
|
||||
}else{ |
|
||||
dir='desc'; |
|
||||
} |
|
||||
if(obj.prop=='xxx'){ |
|
||||
this.pageInfo.orderFields=['xxx']; |
|
||||
this.pageInfo.orderDirs=[dir]; |
|
||||
} |
|
||||
this.getItemOptions(); |
|
||||
}, |
|
||||
searchItemOptions(){ |
|
||||
|
|
||||
this.pageInfo.count=true; |
|
||||
this.getItemOptions(); |
|
||||
}, |
|
||||
//获取列表 ItemOption 数据项取值列表 |
|
||||
getItemOptions() { |
|
||||
let params = { |
|
||||
pageSize: this.pageInfo.pageSize, |
|
||||
pageNum: this.pageInfo.pageNum, |
|
||||
total: this.pageInfo.total,count:this.pageInfo.count |
|
||||
}; |
|
||||
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){ |
|
||||
let orderBys=[]; |
|
||||
for(var i=0;i<this.pageInfo.orderFields.length;i++){ |
|
||||
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i]) |
|
||||
} |
|
||||
params.orderBy= orderBys.join(",") |
|
||||
} |
|
||||
if(this.filters.key!==""){ |
|
||||
//params.xxx=this.filters.key |
|
||||
}else{ |
|
||||
//params.xxx=xxxxx |
|
||||
} |
|
||||
if(this.item!=null && this.item.id!=''){ |
|
||||
params.itemId=this.item.id |
|
||||
} |
|
||||
this.load.list = true; |
|
||||
listItemOption(params).then((res) => { |
|
||||
var tips=res.data.tips; |
|
||||
if(tips.isOk){ |
|
||||
this.pageInfo.total = res.data.data.total;this.pageInfo.count=false; |
|
||||
this.itemOptions = res.data.data; |
|
||||
}else{ |
|
||||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' }); |
|
||||
} |
|
||||
this.load.list = false; |
|
||||
}).catch(() => { |
|
||||
this.load.list = false; |
|
||||
//this.$notify({position:'bottom-left',showClose:true,message: '通讯错误', type: 'error' }); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
//显示编辑界面 ItemOption 数据项取值列表 |
|
||||
showEdit: function ( row,index ) { |
|
||||
this.editFormVisible = true; |
|
||||
this.editForm = Object.assign({}, row); |
|
||||
}, |
|
||||
//显示新增界面 ItemOption 数据项取值列表 |
|
||||
showAdd: function () { |
|
||||
this.addForm.itemId=this.item.id; |
|
||||
this.addFormVisible = true; |
|
||||
//this.addForm=Object.assign({}, this.editForm); |
|
||||
}, |
|
||||
afterAddSubmit(){ |
|
||||
this.addFormVisible=false; |
|
||||
this.pageInfo.count=true; |
|
||||
this.getItemOptions(); |
|
||||
}, |
|
||||
afterEditSubmit(){ |
|
||||
this.editFormVisible=false; |
|
||||
}, |
|
||||
//选择行itemOption |
|
||||
selsChange: function (sels) { |
|
||||
this.sels = sels; |
|
||||
}, |
|
||||
//删除itemOption |
|
||||
handleDel: function (row,index) { |
|
||||
|
|
||||
this.$confirm('确认删除该记录吗?', '提示', { |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
this.load.del=true; |
|
||||
let params =row; |
|
||||
delItemOption(params).then((res) => { |
|
||||
this.load.del=false; |
|
||||
var tips=res.data.tips; |
|
||||
if(tips.isOk){ |
|
||||
this.pageInfo.count=true; |
|
||||
this.getItemOptions(); |
|
||||
} |
|
||||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|
||||
}); |
|
||||
}).catch(() => { |
|
||||
this.load.del=false; |
|
||||
}); |
|
||||
}, |
|
||||
//批量删除itemOption |
|
||||
batchDel: function () { |
|
||||
|
|
||||
this.$confirm('确认删除选中记录吗?', '提示', { |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
this.load.del=true; |
|
||||
batchDelItemOption(this.sels).then((res) => { |
|
||||
this.load.del=false; |
|
||||
var tips=res.data.tips; |
|
||||
if( tips.isOk ){ |
|
||||
this.pageInfo.count=true; |
|
||||
this.getItemOptions(); |
|
||||
} |
|
||||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'}); |
|
||||
}); |
|
||||
}).catch(() => { |
|
||||
this.load.del=false; |
|
||||
}); |
|
||||
}, |
|
||||
rowClick: function(row, event, column){ |
|
||||
this.$emit('row-click',row, event, column);// @row-click="rowClick" |
|
||||
}, |
|
||||
itemRowClick: function(row, event, column){ |
|
||||
this.item=row |
|
||||
this.searchItemOptions(); |
|
||||
}, |
|
||||
/**begin 自定义函数请在下面加**/ |
|
||||
//新增提交ItemOption 数据项取值列表 父组件监听@submit="afterAddSubmit" |
|
||||
addSubmit: function () { |
|
||||
if(this.item==null || this.item.id == '' ){ |
|
||||
this.$message.error("请先选择分类") |
|
||||
} |
|
||||
|
|
||||
this.load.add=true |
|
||||
let params = Object.assign({}, this.addForm); |
|
||||
params.itemId=this.item.id |
|
||||
addItemOption(params).then((res) => { |
|
||||
this.load.add=false |
|
||||
var tips=res.data.tips; |
|
||||
if(tips.isOk){ |
|
||||
this.itemOptions.push(res.data.data); |
|
||||
} |
|
||||
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); |
|
||||
}).catch(() => { |
|
||||
this.load.add=false |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
/**end 自定义函数请在上面加**/ |
|
||||
|
|
||||
},//end methods |
},//end methods |
||||
components: { |
components: { |
||||
'item-option-add':ItemOptionAdd, |
|
||||
'item-option-edit':ItemOptionEdit, |
|
||||
'sticky': Sticky |
|
||||
//在下面添加其它组件 |
|
||||
|
ItemMng, |
||||
}, |
}, |
||||
mounted() { |
mounted() { |
||||
this.$nextTick(() => { |
|
||||
this.getItemOptions(); |
|
||||
}); |
|
||||
} |
} |
||||
} |
} |
||||
|
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
<style scoped> |
||||
|
|
||||
</style> |
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue