Commit 3445a4f2 authored by lizhichao's avatar lizhichao
parents 919ed249 49ac7abd
...@@ -69,6 +69,7 @@ public class TEnterpriseSystemController extends BaseController ...@@ -69,6 +69,7 @@ public class TEnterpriseSystemController extends BaseController
/** /**
* 新增企业制度管理 * 新增企业制度管理
*/ */
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:add')")
@Log(title = "企业制度管理", businessType = BusinessType.INSERT) @Log(title = "企业制度管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TEnterpriseSystem tEnterpriseSystem) public AjaxResult add(@RequestBody TEnterpriseSystem tEnterpriseSystem)
...@@ -79,6 +80,7 @@ public class TEnterpriseSystemController extends BaseController ...@@ -79,6 +80,7 @@ public class TEnterpriseSystemController extends BaseController
/** /**
* 修改企业制度管理 * 修改企业制度管理
*/ */
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:edit')")
@Log(title = "企业制度管理", businessType = BusinessType.UPDATE) @Log(title = "企业制度管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TEnterpriseSystem tEnterpriseSystem) public AjaxResult edit(@RequestBody TEnterpriseSystem tEnterpriseSystem)
...@@ -89,6 +91,7 @@ public class TEnterpriseSystemController extends BaseController ...@@ -89,6 +91,7 @@ public class TEnterpriseSystemController extends BaseController
/** /**
* 删除企业制度管理 * 删除企业制度管理
*/ */
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:remove')")
@Log(title = "企业制度管理", businessType = BusinessType.DELETE) @Log(title = "企业制度管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{systemIds}") @DeleteMapping("/{systemIds}")
public AjaxResult remove(@PathVariable Long[] systemIds) public AjaxResult remove(@PathVariable Long[] systemIds)
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['safetyManagement:enterpriseSystem:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -77,18 +78,24 @@ ...@@ -77,18 +78,24 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> <!-- <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.status == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row)"
>详情</el-button>
<!--<el-button
v-if="scope.row.status == '0'" v-if="scope.row.status == '0'"
size="mini" size="mini"
type="text" type="text"
...@@ -108,13 +115,13 @@ ...@@ -108,13 +115,13 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleInvalid(scope.row)" @click="handleInvalid(scope.row)"
>作废</el-button> >作废</el-button>-->
<el-button <el-button
v-if="scope.row.status == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -169,10 +176,10 @@ ...@@ -169,10 +176,10 @@
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
<el-form-item v-show="operate" label="审批" prop="status"> <!--<el-form-item v-show="operate" label="审批" prop="status">
<el-radio v-model="form.status" label="2">通过</el-radio> <el-radio v-model="form.status" label="2">通过</el-radio>
<el-radio v-model="form.status" label="0">驳回</el-radio> <el-radio v-model="form.status" label="0">驳回</el-radio>
</el-form-item> </el-form-item>-->
</div> </div>
<div style="width: 58%;margin-left: 2%"> <div style="width: 58%;margin-left: 2%">
<div class="dialogTitle">制度内容</div> <div class="dialogTitle">制度内容</div>
...@@ -180,7 +187,7 @@ ...@@ -180,7 +187,7 @@
</div> </div>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer" v-show="!readOnly">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
...@@ -339,6 +346,20 @@ export default { ...@@ -339,6 +346,20 @@ export default {
} }
}); });
}, },
/** 详情按钮操作 */
handleDetail(row) {
this.readOnly=true;
this.reset();
const systemId = row.systemId || this.ids
getEnterpriseSystem(systemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "企业制度信息详情";
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: this.form.fileName, url: uploadfile}];
}
});
},
/** 审批按钮操作 */ /** 审批按钮操作 */
handleApproval(row) { handleApproval(row) {
this.readOnly = true; this.readOnly = true;
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['safetyManagement:enterpriseSystem:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -92,7 +93,14 @@ ...@@ -92,7 +93,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row)"
>详情</el-button>
<!--<el-button <!--<el-button
v-if="scope.row.status == '0'" v-if="scope.row.status == '0'"
size="mini" size="mini"
...@@ -119,6 +127,7 @@ ...@@ -119,6 +127,7 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -200,7 +209,7 @@ ...@@ -200,7 +209,7 @@
</div> </div>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer" v-show="!readOnly">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
...@@ -357,6 +366,20 @@ export default { ...@@ -357,6 +366,20 @@ export default {
} }
}); });
}, },
/** 详情按钮操作*/
handleDetail(row) {
this.readOnly=true;
this.reset();
const systemId = row.systemId || this.ids
getEnterpriseSystem(systemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "法律法规信息详情";
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: this.form.fileName, url: uploadfile}];
}
});
},
/** 审批按钮操作 */ /** 审批按钮操作 */
handleApproval(row) { handleApproval(row) {
this.readOnly = true; this.readOnly = true;
......
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