Commit 3445a4f2 authored by lizhichao's avatar lizhichao
parents 919ed249 49ac7abd
......@@ -69,6 +69,7 @@ public class TEnterpriseSystemController extends BaseController
/**
* 新增企业制度管理
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:add')")
@Log(title = "企业制度管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseSystem tEnterpriseSystem)
......@@ -79,6 +80,7 @@ public class TEnterpriseSystemController extends BaseController
/**
* 修改企业制度管理
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:edit')")
@Log(title = "企业制度管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseSystem tEnterpriseSystem)
......@@ -89,6 +91,7 @@ public class TEnterpriseSystemController extends BaseController
/**
* 删除企业制度管理
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:remove')")
@Log(title = "企业制度管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{systemIds}")
public AjaxResult remove(@PathVariable Long[] systemIds)
......
......@@ -56,6 +56,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['safetyManagement:enterpriseSystem:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......@@ -77,18 +78,24 @@
<span v-else>-</span>
</template>
</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" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="scope.row.status == '0'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>修改</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'"
size="mini"
type="text"
......@@ -108,13 +115,13 @@
type="text"
icon="el-icon-edit"
@click="handleInvalid(scope.row)"
>作废</el-button>
>作废</el-button>-->
<el-button
v-if="scope.row.status == '0'"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:remove']"
>删除</el-button>
</template>
</el-table-column>
......@@ -169,10 +176,10 @@
</span>
<span v-else>-</span>
</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="0">驳回</el-radio>
</el-form-item>
</el-form-item>-->
</div>
<div style="width: 58%;margin-left: 2%">
<div class="dialogTitle">制度内容</div>
......@@ -180,7 +187,7 @@
</div>
</div>
</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 @click="cancel">取 消</el-button>
</div>
......@@ -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) {
this.readOnly = true;
......
......@@ -46,6 +46,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['safetyManagement:enterpriseSystem:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......@@ -92,7 +93,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>修改</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'"
size="mini"
......@@ -119,6 +127,7 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:remove']"
>删除</el-button>
</template>
</el-table-column>
......@@ -200,7 +209,7 @@
</div>
</div>
</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 @click="cancel">取 消</el-button>
</div>
......@@ -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) {
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