| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <html>
- <head>
-
- </head>
- <body>
- <div id="space-content">
- <div class="space-form-infor" style="overflow-x: hidden;">
- <el-form action='@service{name:`post_change_submit`, page:`toTips`, params:`{postid:"${post.postid}"}` }@' method="post" :model="obj" :rules="appRules" ref="obj" label-width="100px">
-
- <el-form-item label="所属单位">
- <el-input clearable value="${post.unit_name}" :disabled="true" ></el-input>
- </el-form-item>
- <el-form-item label="名称" prop="name">
- <el-input clearable v-model="obj.name"></el-input>
- </el-form-item>
- <el-form-item label="所属部门" prop="departmentid">
- <el-cascader v-model="obj.departmentid" collapse-tags :props="{ emitPath: false, checkStrictly: true }" :options="departmentOptions" placeholder="请选择" clearable style="width:100%"></el-cascader>
- </el-form-item>
- <el-form-item label="岗位职责" prop="describe">
- <space-editor v-model="obj.describe" height="220px" placeholder="请输入岗位职责" ref="editor"></space-editor>
- </el-form-item>
- </el-form>
- </div>
- <div class="space-form-btn">
- <el-button type="primary" icon="el-icon-circle-check" :loading="loading" onclick="space.forms.submit();">保存</el-button>
- <el-button type="warning" v-if="disable" icon="el-icon-warning-outline" onclick='@service{ name:`post_status_submit`, params:`{postid: "${post.postid}", dcode: "71"}`, page:`toTips`, type:`confirm`, msg: `是否确定停用?`, refresh:`true` }@'>停用</el-button>
- <el-button type="success" v-if="enable" icon="el-icon-warning-outline" onclick='@service{ name:`post_status_submit`, params:`{postid: "${post.postid}", dcode: "61"}`, page:`toTips`, type:`confirm`, msg: `是否确定启用?`, refresh:`true` }@'>启用</el-button>
- <el-button type="danger" icon="el-icon-delete" onclick='@service{ name:`post_status_submit`, params:`{postid: "${post.postid}", dcode: "72"}`, page:`toTips`, type:`confirm`, msg: `是否确定删除?`, refresh:`true` }@' >删除</el-button>
- <el-button icon="el-icon-circle-close" onclick="space.allFunction.closeDialog();">关闭</el-button>
- </div>
- </div>
- </body>
- <script type="text/javascript">
-
- var ckEditor = undefined;
-
- space.vue = new Vue({
- el: space.appContent,
- data() {
- return {
- obj: {
- name: '${post.name}',
- departmentid: parseInt("${post.departmentid}"),
- describe: `<app:getHtmlContent filePath="${post.describe}" />`
- },
- departmentOptions: undefined,
- appRules: {
- name: space.rules.required({
- label: '名称'
- }),
- departmentid: space.rules.select.required({
- label: "所属部门"
- })
- },
- disable: space.utils.dataStatus.disable("${post.dcode}"),
- enable: space.utils.dataStatus.enable("${post.dcode}"),
- loading: false
- };
- },
- created: function() {
- this.initDepartmentOption();
- },
- methods: {
- /**
- * 初始化部门列表
- */
- initDepartmentOption: function() {
- var unitid = '${post.unitid}';
- if (!unitid) {
- return;
- }
- var _this = this;
- space.utils.ajax({
- url: '@service{ name:`unit_department_list_api` }@',
- data: {
- "unitid" : unitid
- },
- dataType: 'json',
- callback: function(data) {
- _this.departmentOptions = data.data;
- }
- })
- }
- }
- })
- $(document).ready(function() {
- space.forms.verify();
- })
- </script>
- </html>
|