| | |
| | | <script> |
| | | import { memberSync } from '@/api/business/member' |
| | | |
| | | export default { |
| | | name: 'BaseOpera', |
| | | data () { |
| | |
| | | } |
| | | // 调用新建接口 |
| | | this.isWorking = true |
| | | var that = this |
| | | this.api.create(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('新建成功') |
| | | this.$emit('success') |
| | | // that.$tip.apiSuccess('新建成功') |
| | | that.$dialog.actionConfirmButton('是否停留该页面继续新建数据?', '新建成功','继续添加','关闭返回') |
| | | .then(() => { |
| | | that.$refs.form.resetFields() |
| | | that.form[this.configData['field.id']] = null |
| | | that.$emit('success') |
| | | }) |
| | | .catch(() => { |
| | | that.visible = false |
| | | that.$emit('success') |
| | | }) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | |
| | | }, |
| | | methods: { |
| | | handleChangeCategory (value) { |
| | | this.form.parentId = null |
| | | if (this.form.categoryList && this.form.categoryList.length >= 1) { |
| | | this.form.parentId = this.form.categoryList[this.form.categoryList.length - 1] |
| | | } |
| | |
| | | </el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="排序码" prop="sortnum"> |
| | | <el-input v-model="form.sortnum" placeholder="请输入排序码(升序)" v-trim/> |
| | | <el-input v-model="form.sortnum" type="number" placeholder="请输入排序码(升序)" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" v-trim/> |
| | |
| | | }, |
| | | methods: { |
| | | handleChangeCategory (value) { |
| | | this.form.parentId = null |
| | | if (this.form.categoryList && this.form.categoryList.length >= 1) { |
| | | this.form.parentId = this.form.categoryList[this.form.categoryList.length - 1] |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | }, |
| | | actionConfirmButton (message, title,confirmButtonText,cancelButtonText) { |
| | | return MessageBox.confirm(message, title, { |
| | | confirmButtonText: confirmButtonText || '确认', |
| | | cancelButtonText: cancelButtonText ||'取消', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | } |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">显示全部</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column> |
| | | <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | |
| | | this.getfindTreePage() |
| | | }, |
| | | methods: { |
| | | refresh () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = null |
| | | this.getfindTreePage() |
| | | this.handlePageChange() |
| | | }, |
| | | handlePageChangeDo () { |
| | | this.searchForm.isRoot = 1 |
| | | this.searchForm.parentId = null |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">显示全部</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column> |
| | | <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | |
| | | this.getfindTreePage() |
| | | }, |
| | | methods: { |
| | | refresh () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = null |
| | | this.getfindTreePage() |
| | | this.handlePageChange() |
| | | }, |
| | | handlePageChangeDo () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = 1 |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">显示全部</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column> |
| | | <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | |
| | | this.getfindTreePage() |
| | | }, |
| | | methods: { |
| | | refresh () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = null |
| | | this.getfindTreePage() |
| | | this.handlePageChange() |
| | | }, |
| | | handlePageChangeDo () { |
| | | this.searchForm.isRoot = 1 |
| | | this.searchForm.parentId = null |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">一级主题</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | | <el-table-column fixed="right" v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="120"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.operaCategoryWindow.open('编辑DCA主题和观察项', row, categoryList,row.type)" v-permissions="['business:category:update']">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row,true, getfindTreePage)" style="color: red" v-permissions="['business:category:delete']">删除</el-button> |
| | |
| | | data () { |
| | | return { |
| | | TreeList: [], |
| | | level: 1, |
| | | level: 0, |
| | | // 搜索 |
| | | searchForm: { |
| | | name: '', |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">显示全部</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column> |
| | | <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | |
| | | this.getfindTreePage() |
| | | }, |
| | | methods: { |
| | | refresh () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = null |
| | | this.getfindTreePage() |
| | | this.handlePageChange() |
| | | }, |
| | | handlePageChangeDo () { |
| | | this.searchForm.isRoot = 1 |
| | | this.searchForm.parentId = null |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" @click="refresh">显示顶层</el-button> |
| | | <el-button type="primary" @click="refresh">显示全部</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column> |
| | | <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280"> |
| | |
| | | this.getfindTreePage() |
| | | }, |
| | | methods: { |
| | | refresh () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = null |
| | | this.getfindTreePage() |
| | | this.handlePageChange() |
| | | }, |
| | | handlePageChangeDo () { |
| | | this.searchForm.parentId = null |
| | | this.searchForm.isRoot = 1 |
| | |
| | | <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE事件工单详情', row)" >{{ row.code || '-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="typeName" label="伤害类型" min-width="100px"></el-table-column> |
| | | <el-table-column prop="typeNamePath" label="伤害类型" min-width="100px"></el-table-column> |
| | | <el-table-column prop="submitDate" label="上报时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | if( category.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(Constants.equalsInteger(category.getId(),category.getParentId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,父级不能设置为自身!"); |
| | | } |
| | | category.setType(null);//类型不支持修改 |
| | | Category model = categoryMapper.selectById(category.getId()); |
| | | if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)) { |
| | |
| | | .eq(Category::getIsdeleted,Constants.ZERO)) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "对不起,名称不能重复~"); |
| | | }*/ |
| | | String oldIdPath = model.getIdPath(); |
| | | String oldNamePath = model.getNamePath(); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | category.setIdPath(category.getId()+"/");//名称路径 |
| | | category.setNamePath(category.getName());//名称路径 |
| | |
| | | } |
| | | category.setEditDate(new Date()); |
| | | category.setEditor(user.getId()); |
| | | categoryMapper.updateById(category); |
| | | categoryMapper.update(null,new UpdateWrapper<Category>().lambda() |
| | | .eq(Category::getId,category.getId()) |
| | | .set(Category::getEditDate,category.getEditDate()) |
| | | .set(Category::getEditor,category.getEditor()) |
| | | .set(Category::getName,category.getName()) |
| | | .set(Category::getParentId,category.getParentId()) |
| | | .set(Category::getSortnum,category.getSortnum()) |
| | | .set(Category::getRemark,category.getRemark()) |
| | | .set(Category::getNamePath,category.getNamePath()) |
| | | .set(Category::getIdPath,category.getId()) |
| | | ); |
| | | //修改全部下级的编码和名称路径 |
| | | categoryMapper.update(null,new UpdateWrapper<Category>().lambda() |
| | | .likeRight(Category::getIdPath,oldIdPath) |
| | | .set(Category::getEditDate,category.getEditDate()) |
| | | .set(Category::getEditor,category.getEditor()) |
| | | .setSql("id_path=replace(id_path,'"+oldIdPath+"','"+category.getIdParentPath()+"')") |
| | | .setSql("name_path=replace(name_path,'"+oldNamePath+"/','"+category.getName()+"/')") |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | |
| | | .selectAs(Member::getPhone,Workorder::getMemberPhone) |
| | | .select(" c2.name ",Workorder::getCategoryName) |
| | | .select(" c3.name ",Workorder::getTypeName) |
| | | .select(" c3.name_path ",Workorder::getTypeNamePath) |
| | | .leftJoin(Member.class,Member::getId,Workorder::getMemberId) |
| | | .leftJoin(" category c3 on t.TYPE_ID = c3.id ") //风险类型 |
| | | .leftJoin(" category c2 on t.CATEGORY_ID = c2.id ") //DCA一级问题编码 |
| | |
| | | content += "<div style='display:block;'> "; |
| | | for (String f : imgList){ |
| | | // 设置附件 |
| | | content += "<img style='width:200px;margin:5px' src='"+f+"'/>"; |
| | | content += "<a href='"+f+"' target='blank'><img style='width:200px;margin:5px' src='"+f+"'/></a>"; |
| | | } |
| | | } |
| | | content += "</div></body><html>"; |