在选定的下拉列表中显示网格中的某些值

时间:2019-06-17 07:19:44

标签: angularjs jquery-chosen angular-chosen

亲爱的,我正在使用selected.js下拉列表来显示数据库中的项目。 并使用angularjs在html表格或网格中显示保存的记录。 我想做的是当用户单击网格中的某些行时,我在html控件中显示选定的行数据。除所选下拉列表外,所有输入框均能正确显示数据,有关如何在所选菜单中显示所选数据的任何帮助,请先感谢

html表

      <dependency>
            <groupId>org.tensorflow</groupId>
            <artifactId>tensorflow</artifactId>
            <version>1.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.tensorflow</groupId>
            <artifactId>libtensorflow</artifactId>
            <version>1.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.tensorflow</groupId>
            <artifactId>libtensorflow_jni_gpu</artifactId>
            <version>1.13.1</version>
        </dependency>



    byte[] config =
            ConfigProto.newBuilder()
                    .setLogDevicePlacement(true)
                    .setAllowSoftPlacement(true)
                    .build()
                    .toByteArray();

选择了html

<table class="table table-striped table-bordered table-hover myTable"
       style="font-size: 12px;">
    <thead>
        <tr>
            <th>Patient ID</th>
            <th>Patient Name</th>
            <th>Staff Name</th>
            <th>From Date</th>
            <th>To Date</th>
            <!--<th>State</th>-->
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="a in allpatients | filter : search"
            ng-click="showInEdit(a)"
            ng-class="{selected:a === selectedRow} ">
            <td>{{a.Patient_Id}}</td>
            <td>{{a.PatEngName}}</td>
            <td>{{a.Staff_name}}</td>
            <td>{{a.FromDate  | date :  "dd/MM/y"}}</td>
            <td>{{a.ToDate  | date :  "dd/MM/y"}}</td>
            <td style="width: 46px;">
                <!--<a href="#">
                <img ng-click="edit();$event.stopPropagation();$event.preventDefault();"
                     src="assets/images/pencil.png" />
            </a>-->
                <a href="#">
                    <img ng-click="delete(a)" src="assets/images/cross.png" />
                </a>
            </td>
        </tr>                               
   </tbody>

angularjs

<div class="form-group" id="field3">
    <label class="title_lable">Staff name :</label>

    <select data-placeholder="Choose a Staff name" ng-model="staffname"
            id="chosenValueID" class="chosen-select" tabindex="2"
            ng-options="s.Staff_Key as s.Staff_name for s in staff">
    </select>
</div>

预先感谢

0 个答案:

没有答案
相关问题